php warning Undefined array key
-
Hi !
someone has set up a WordPress instance for me (6.5.2).
So they did : website works well.
However, when I connect to admin pages https://mywebsite/wp-admin/profile.php , I have multiple php warnings :Warning: Undefined array key 2 in /home/clients/<id>/sites/mywebsite/wp-admin/includes/menu.php on line 181 Warning: Undefined array key 2 in /home/clients/<id>/sites/mywebsite/wp-admin/includes/plugin.php on line 2012 Warning: Undefined array key 2 in /home/clients/<id>/sites/mywebsite/wp-admin/includes/plugin.php on line 2012 Warning: Undefined array key 2 in /home/clients/<id>/sites/mywebsite/wp-admin/menu-header.php on line 155 Warning: Undefined array key 2 in /home/clients/<id>/sites/mywebsite/wp-admin/menu-header.php on line 156 Warning: Undefined array key 2 in /home/clients/<id>/sites/mywebsite/wp-admin/menu-header.php on line 164 Warning: Undefined array key 2 in /home/clients/<id>/sites/mywebsite/wp-admin/menu-header.php on line 171This happens only when connecting admin pages with limited privileges (I have tried Author and Editor).
The warnings don’t appear when connecting with privileges = Administrator : I have tried granting Admin privileges, it fixes the bug but I don’t want all users having Admin privileges, so I reverted and the bug came back…Versions/Details :
- WordPress 6.5.2
- advanced extensions : 1 = advanced-cache.php
- Theme : Divi Child (Divi-child-theme) / Parent Divi (Divi)
- Server : Linux
- web server : Apache
- php : 8.2.16
- DB : MariaDB 10.6
Note :
- I have tried to use php 8.1 and 8.0 ; bug is still present
- I have tried using php 7.4, so bug disappears, but I reverted to 8.2 as I don’t want using an obsolete version of php
- I have tried emptying cache or disabling it, it doesn’t impact the bug
To mention : the DB was MySQL 5.6 until recently (bug was already there). I have migrated to MariaDB 10.6 recently but bug is still there 🙁
Thanks in advance
The topic ‘php warning Undefined array key’ is closed to new replies.