freePBX-16 Superfecta LDAP-lookup error

I am just playing around with a new freePBX-16 installation. I did install ImageMagick and therefore had to change php version 7.4.16 to 7.4.28, but this seems not to be the cause of the problem.
When I run a debug on a CID-Superfecta scheme, I received an error in line 191 (source-LDAP.module). The LDAP-lookup didnt work. This seems to be a problem caused by any 7+ php version, it’s about a non-numeric value…described here

Accordingly I changed line 191 in the source LDAP module from

$thenumber = substr($thenumber, (-1*$run_param[‘Filter_Length’]));


$thenumber = substr($thenumber, (-1*(int)$run_param[‘Filter_Length’]));

…now it seems to work :wink:

It seems php-7.4 (7.1) has a new feature, which requires a little change of the code of the source-LDAP-module.

Here’s the relevant text from the link above:

New E_WARNING and E_NOTICE errors have been introduced when invalid strings are coerced using operators expecting numbers or their assignment equivalents. An E_NOTICE is emitted when the string begins with a numeric value but contains trailing non-numeric characters, and an E_WARNING is emitted when the string does not contain a numeric value.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.