leenooks / phpLDAPadmin

phpLDAPadmin - Web based LDAP administration tool
www.phpldapadmin.org
GNU General Public License v2.0
520 stars 166 forks source link

Unrecognized error number: 8192: trim(): Passing null to parameter #1 ($string) of type string is deprecated #247

Closed darknight7 closed 8 months ago

darknight7 commented 9 months ago

A strikingly similar issue was closed as compatibility with php 8.1 was declared complete, except this happens with the latest release.

To Reproduce Import an ldif like this one:

dn: cn=group123,ou=Group,dc=my,dc=do,dc=ma,dc=in
changetype: modify
add: memberUid
memberUid: mynewmember

Manually adding a member through the interface works.

Trace

PHP Debug Backtrace
File    /var/www/localhost/htdocs/phpla/lib/functions.php (192)
    Function    error ([a:5:{i:0;s:108:"Unrecognized error number: 8192: t...](https://www.my.domain/phpla/tools/unserialize.php?index=0))
File    /var/www/localhost/htdocs/phpla/lib/functions.php ()
    Function    app_error_handler ([a:4:{i:0;i:8192;i:1;s:75:"trim(): Passing null to ...](https://www.my.domain/phpla/tools/unserialize.php?index=1))
File    /var/www/localhost/htdocs/phpla/lib/import_functions.php (544)
    Function    trim ([a:1:{i:0;N;}](https://www.my.domain/phpla/tools/unserialize.php?index=2))
File    /var/www/localhost/htdocs/phpla/lib/import_functions.php (220)
    Function    getModifyDetails ([a:1:{i:0;a:0:{}}](https://www.my.domain/phpla/tools/unserialize.php?index=3))
File    /var/www/localhost/htdocs/phpla/htdocs/import.php (54)
    Function    readEntry ([a:0:{}](https://www.my.domain/phpla/tools/unserialize.php?index=4))
File    /var/www/localhost/htdocs/phpla/htdocs/cmd.php (59)
    Function    include ([a:1:{i:0;s:49:"/var/www/localhost/htdocs/phpla/htd...](https://www.my.domain/phpla/tools/unserialize.php?index=5))

LDAP Server details (please complete the following information):

williamdes commented 9 months ago

I confirm this bug with the same data input using another object

williamdes commented 9 months ago

Could you try my patch: https://github.com/leenooks/phpLDAPadmin/pull/249 ?

darknight7 commented 9 months ago

Tried and working 100% thank you!

williamdes commented 9 months ago

Please do not close this issue, when the PR is merged it will automatically close Can you re open?