4

error

New to the field can find specific answer in the web hope you can help me with this. I didn't write the code I just follow a documentation on how to install openldap on php8.1 ubuntu 22.04

Sean
  • 51
  • 1
  • 3
  • Please provide enough code so others can better understand or reproduce the problem. – Community Nov 10 '22 at 06:50
  • 1
    This is an incompatibility between php 8.1 and phpldapadmin 1.2.6.3. It looks like they fixed this in 1.2.6.4 , but there isn't an updated package from Ubuntu at the moment. – Yaur Dec 06 '22 at 21:49
  • yeah PHP devs have gone insane not allowing to pass empty (null) values to `trim()` making another C from PHP, now waiting for `malloc()` to kill that language – Flash Thunder Apr 11 '23 at 10:30

2 Answers2

1

PHP 8.1 no longer supports passing null values to trim, prior to 8.1 those values would be turned into an empty string internally, with 8.1 they will no longer be changed.

If you have access to the code you should check if the value is null before being placed into trim or default the value to an empty string. You would need to fix those areas lsited in that error output manually.

dvnc0
  • 19
  • 3
1

There is an official launchpad bug reported for this.

And if you check the github issues of phpLDAPadmin, there are a couple of other current bugs relevant to us with PHP 8+ and OpenSSL 3+.

  • Yeah, and non of them are offering a solid solution. I suppose the only solution is to downgrade PHP to a version where null is acceptable in trim – cruise_lab Apr 17 '23 at 01:20