Fix php error when using strlen on null

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2019-12-30 15:47:48 +01:00
parent 3000f99370
commit f5b6d8aec3
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889

View File

@ -2420,7 +2420,7 @@ class InsertEdit
$foreigner['foreign_table']
);
// Field to display from the foreign table?
if ($display_field !== null && strlen($display_field) > 0) {
if (is_string($display_field) && strlen($display_field) > 0) {
$dispsql = 'SELECT ' . Util::backquote($display_field)
. ' FROM ' . Util::backquote($foreigner['foreign_db'])
. '.' . Util::backquote($foreigner['foreign_table'])