Noticed during bug 54662
Warning: strcmp() expects parameter 2 to be string, array given in
/usr/local/apache/common-local/php-1.22wmf19/includes/GlobalFunctions.php on
line 127
Bug: 54662
Change-Id: Icdd7fa229e49d7e83aa2a7992895f497806448e1
}
/**
- * @param $a
- * @param $b
+ * @param $a array|string
+ * @param $b array|string
* @return int
*/
function wfArrayDiff2_cmp( $a, $b ) {
- if ( !is_array( $a ) ) {
+ if ( is_string( $a ) && is_string( $b ) ) {
return strcmp( $a, $b );
} elseif ( count( $a ) !== count( $b ) ) {
return count( $a ) < count( $b ) ? -1 : 1;