From fadfe2d2ba86592631fe1404e8c1d8e42c7c340d Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Thu, 28 Jan 2021 16:57:51 +0100 Subject: [PATCH] LSldapObject::validateAttrData(): fix fatal errors on missing formated log messages --- src/includes/class/class.LSldapObject.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/includes/class/class.LSldapObject.php b/src/includes/class/class.LSldapObject.php index 4c87632d..fcc92781 100644 --- a/src/includes/class/class.LSldapObject.php +++ b/src/includes/class/class.LSldapObject.php @@ -542,7 +542,7 @@ class LSldapObject extends LSlog_staticLoggerClass { self :: log_warning( "validateAttrData(".$LSform->idForm.", ".$attr->name."): ". "validation with LDAP search on base DN='$sbasedn' and ". - "filter='".$sfilter->as_string()."' error ($ret object(s) found)" + "filter='".($sfilter?$sfilter->as_string():null)."' error ($ret object(s) found)" ); if ($LSform) $LSform -> setElementError($attr, $msg_error); @@ -551,7 +551,7 @@ class LSldapObject extends LSlog_staticLoggerClass { self :: log_trace( "validateAttrData(".$LSform->idForm.", ".$attr->name."): ". "validation with LDAP search on base DN='$sbasedn' and ". - "filter='".$sfilter->as_string()."' success ($ret object(s) found)" + "filter='".($sfilter?$sfilter->as_string():null)."' success ($ret object(s) found)" ); } }