mirror of
https://github.com/php/php-src.git
synced 2024-11-24 02:15:04 +08:00
Indicate entry is skipped in error message
This commit is contained in:
parent
0b4e007253
commit
f816171240
@ -4109,7 +4109,7 @@ PHP_FUNCTION(array_count_values)
|
||||
Z_LVAL_P(tmp)++;
|
||||
}
|
||||
} else {
|
||||
php_error_docref(NULL, E_WARNING, "Can only count STRING and INTEGER values!");
|
||||
php_error_docref(NULL, E_WARNING, "Can only count string and integer values, entry skipped");
|
||||
}
|
||||
} ZEND_HASH_FOREACH_END();
|
||||
}
|
||||
@ -4452,7 +4452,7 @@ PHP_FUNCTION(array_flip)
|
||||
}
|
||||
zend_symtable_update(Z_ARRVAL_P(return_value), Z_STR_P(entry), &data);
|
||||
} else {
|
||||
php_error_docref(NULL, E_WARNING, "Can only flip STRING and INTEGER values!");
|
||||
php_error_docref(NULL, E_WARNING, "Can only flip string and integer values, entry skipped");
|
||||
}
|
||||
} ZEND_HASH_FOREACH_END();
|
||||
}
|
||||
|
@ -18,11 +18,11 @@ $array1 = array(1,
|
||||
var_dump(array_count_values($array1));
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: array_count_values(): Can only count STRING and INTEGER values! in %s on line %d
|
||||
Warning: array_count_values(): Can only count string and integer values, entry skipped in %s on line %d
|
||||
|
||||
Warning: array_count_values(): Can only count STRING and INTEGER values! in %s on line %d
|
||||
Warning: array_count_values(): Can only count string and integer values, entry skipped in %s on line %d
|
||||
|
||||
Warning: array_count_values(): Can only count STRING and INTEGER values! in %s on line %d
|
||||
Warning: array_count_values(): Can only count string and integer values, entry skipped in %s on line %d
|
||||
array(8) {
|
||||
[1]=>
|
||||
int(2)
|
||||
|
@ -16,11 +16,11 @@ $trans = array_flip($trans);
|
||||
var_dump($trans);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
|
||||
Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
|
||||
|
||||
Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
|
||||
Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
|
||||
|
||||
Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
|
||||
Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
|
||||
array(6) {
|
||||
[1]=>
|
||||
string(1) "b"
|
||||
|
@ -62,29 +62,29 @@ echo "Done"
|
||||
--EXPECTF--
|
||||
*** Testing array_flip() : different invalid values in 'input' array argument ***
|
||||
|
||||
Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
|
||||
Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
|
||||
|
||||
Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
|
||||
Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
|
||||
|
||||
Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
|
||||
Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
|
||||
|
||||
Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
|
||||
Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
|
||||
|
||||
Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
|
||||
Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
|
||||
|
||||
Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
|
||||
Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
|
||||
|
||||
Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
|
||||
Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
|
||||
|
||||
Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
|
||||
Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
|
||||
|
||||
Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
|
||||
Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
|
||||
|
||||
Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
|
||||
Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
|
||||
|
||||
Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
|
||||
Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
|
||||
|
||||
Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
|
||||
Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
|
||||
array(0) {
|
||||
}
|
||||
Done
|
||||
|
Loading…
Reference in New Issue
Block a user