Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

Bug Fix: array_key_...
 
Notifications
Clear all

Bug Fix: array_key_exists() with potentially null key in tool/projeqtor.php V13.0.1 is depreciated on PHP 8.5

2 Posts
2 Users
0 Reactions
53 Views
(@angeltek)
Posts: 20
Active Member
Topic starter
 
[#10135]

This causes a blank screen during logging in for a non-admin user in Projeqtor v13.0.1 (admin user appears to login fine). It is what triggered the exceptionHandler() bug I reported. The Projeqtor log reports:

2026-08-07 15:41:13.696 ===== TRACE ===== [3] NEW CONNECTED USER 'testuser'
2026-08-07 15:41:15.337 ** ERROR ** [V13.0.1] [3] ERROR **
2026-08-07 15:41:15.338
** ERROR ** [V13.0.1] [3] on file '/var/www/example.org/projeqtor/tool/projeqtor.php' at line (3626)
2026-08-07 15:41:15.338
** ERROR ***** [V13.0.1] [3] cause = Using null as the key parameter for array_key_exists() is deprecated, use an empty string instead

The fix is to replace the following line 3625 (or 3626 if you've applied my exceptionHandler() fix) in tool/projeqtor.php :

if (array_key_exists($obj->idProject, $user->getAffectedProjects($limitToActiveProjects)) or $obj->id==null) {

With this:

if (array_key_exists($obj->idProject ?? '', $user->getAffectedProjects($limitToActiveProjects)) or $obj->id==null) {

 

 


 
Posted : 07 Aug 2026 18H11
babynus
(@babynus)
Posts: 14960
Main Contributor Admin
 

Hi,

 

Will globally be fixed on V13.1

We'll replace all array_key_exists with pq_array_key_exists that manages null parameters.

We already did this for PHP8.1 compatibility on most string functions.


 
Posted : 13 Aug 2026 16H54
Share:

Scroll to Top