Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By ursika on
I am using Drupal 5.20 and recently our server upgraded to PHP 5.3. I ran the PHP 5.3. compatibility patch, but I can still not solve two things:
1. warning: call_user_func_array() expects parameter 2 to be array, string given in .../includes/menu.inc on line 418.
2. I am not able to see the settings of certain modules, for example OG User Roles, Advanced front page... when I click on the settings page I get a blank page, WSOD. Did you come across similar problems?
Appreciate any hints!
Comments
I am still getting an error
I am still getting an error form menu.inc line 415.
I get this problem on many different admin settings pages, usually very random, in some cases once I refresh the page the error is gone, but in other cases I get WSOD. Here are some pages that returned this error:
admin/settings/site-maintenance
admin/user/invite
admin/settings/front
admin/og/og_user_roles
In the last 2 cases I get a WSOD, but in the first two I just get a warning message that disappears after refresh. The code that returns error comes from call_user_func_array in this part of the code in menu.inc:
$arguments = isset($menu['callbacks'][$path]['callback arguments']) ? $menu['callbacks'][$path]['callback arguments'] : array();
$arg = substr($_GET['q'], strlen($path) + 1);
if (strlen($arg)) {
$arguments = array_merge($arguments, explode('/', $arg));
}
return call_user_func_array($menu['callbacks'][$path]['callback'], $arguments);
I have tried adding & to $arguments, I also used typecasting (array) before the $arguments, since the behavior of array_merge() was modified in PHP 5. Unlike PHP 4, array_merge() only accepts parameters of type array. But none of that helped.
Fix
Here is a quick and dirty fix to the problem. (Actually it it not dirty, but it is fixing the problem in Drupal core when it is really a problem in some of the contrib modules.)
At line 414 in includes/menu.inc add the extra line that contains the comment:
Thank you, no more WSOD!
Thank you, no more WSOD!
thanks for this
thanks for this
Upgraded to php 5.3
My site D5 got the same problem after upgrading to php5.3:
Replace the lines in includes/menu.inc
with followings
It seems to fix this problem.
By the way , this solution also has another problem fixed: the blank node page from the Workflow module can show up again.
To reset all settings you can
To reset all settings you can also simply delete the FileZilla Server Interface.xml and FileZilla Server.xml files.