warning: strcmp() expects parameter 2 to be string, array given in H:\server\liveserverd\www\go\modules\system\system.module on line 1125.
Whenever you click Admin with Total Control enabled and you have php 5.3 u get this error:
warning: strcmp() expects parameter 2 to be string, array given in H:\server\liveserverd\www\go\modules\system\system.module on line 1125.
warning: strcmp() expects parameter 2 to be string, array given in H:\server\liveserverd\www\go\modules\system\system.module on line 1125.
warning: strcmp() expects parameter 2 to be string, array given in H:\server\liveserverd\www\go\modules\system\system.module on line 1125.
FIX:::: SYSTEM.MODULE LINES 1118-11133
/**
* Helper function to sort requirements.
*/
function _system_sort_requirements($a, $b) {
+ $a = array('weight','title');
+ $b = array('weight','title');
if (!isset($a['weight'])) {
if (!isset($b['weight'])) {
return strcmp($a['title'] ,$b['title']);
}
return -$b['weight'];
}
return isset($b['weight']) ? $a['weight'] - $b['weight'] : $a['weight'];
}
/**
Comments
Comment #1
damien tournoud commentedYou probably have a misbehaving module in your installation, which implements hook_requirements() in a broken way.
Comment #2
livespots commentedProbably, either way... adding:
+ $a = array('weight','title');
+ $b = array('weight','title');
to system module fixed it.
Comment #3
binaryflo commentedlivespots, your patch fixed stopped the error for me too.
php 5.3.3
Comment #4
lalit774 commentedComment #5
krisrobinson commented#2 also worked for me... is this fixing something or just a band aid hack?
Comment #6
acbramley commentedThis is most likely what was described in #1 so this patch is really just a band-aid. I'm getting the errors too on D7, I will try tracking down the module causing this.
Comment #7
acbramley commentedAlso that patch is overwriting the information that is passed to the function.
Comment #8
Brn commentedI'm tracking this error too (drupal 6.22 with wampMSS to test PHP5.3)
What do you thing about system module at line 1725 :
Comment #9
ParisLiakos commentedthis is a duplicate of this #933684: Same requirements from different modules causes warnings in _system_sort_requirements()
Comment #10
roberto.musa commentedwarning: strcmp() expects parameter 2 to be string, array given in...
Resolved serializing arrays: