Skip to content

Commit f816171

Browse files
committed
Indicate entry is skipped in error message
1 parent 0b4e007 commit f816171

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

ext/standard/array.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4109,7 +4109,7 @@ PHP_FUNCTION(array_count_values)
41094109
Z_LVAL_P(tmp)++;
41104110
}
41114111
} else {
4112-
php_error_docref(NULL, E_WARNING, "Can only count STRING and INTEGER values!");
4112+
php_error_docref(NULL, E_WARNING, "Can only count string and integer values, entry skipped");
41134113
}
41144114
} ZEND_HASH_FOREACH_END();
41154115
}
@@ -4452,7 +4452,7 @@ PHP_FUNCTION(array_flip)
44524452
}
44534453
zend_symtable_update(Z_ARRVAL_P(return_value), Z_STR_P(entry), &data);
44544454
} else {
4455-
php_error_docref(NULL, E_WARNING, "Can only flip STRING and INTEGER values!");
4455+
php_error_docref(NULL, E_WARNING, "Can only flip string and integer values, entry skipped");
44564456
}
44574457
} ZEND_HASH_FOREACH_END();
44584458
}

ext/standard/tests/array/array_count_values2.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ $array1 = array(1,
1818
var_dump(array_count_values($array1));
1919
?>
2020
--EXPECTF--
21-
Warning: array_count_values(): Can only count STRING and INTEGER values! in %s on line %d
21+
Warning: array_count_values(): Can only count string and integer values, entry skipped in %s on line %d
2222

23-
Warning: array_count_values(): Can only count STRING and INTEGER values! in %s on line %d
23+
Warning: array_count_values(): Can only count string and integer values, entry skipped in %s on line %d
2424

25-
Warning: array_count_values(): Can only count STRING and INTEGER values! in %s on line %d
25+
Warning: array_count_values(): Can only count string and integer values, entry skipped in %s on line %d
2626
array(8) {
2727
[1]=>
2828
int(2)

ext/standard/tests/array/array_flip.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ $trans = array_flip($trans);
1616
var_dump($trans);
1717
?>
1818
--EXPECTF--
19-
Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
19+
Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
2020

21-
Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
21+
Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
2222

23-
Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
23+
Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
2424
array(6) {
2525
[1]=>
2626
string(1) "b"

ext/standard/tests/array/array_flip_variation4.phpt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -62,29 +62,29 @@ echo "Done"
6262
--EXPECTF--
6363
*** Testing array_flip() : different invalid values in 'input' array argument ***
6464

65-
Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
65+
Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
6666

67-
Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
67+
Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
6868

69-
Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
69+
Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
7070

71-
Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
71+
Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
7272

73-
Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
73+
Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
7474

75-
Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
75+
Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
7676

77-
Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
77+
Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
7878

79-
Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
79+
Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
8080

81-
Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
81+
Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
8282

83-
Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
83+
Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
8484

85-
Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
85+
Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
8686

87-
Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
87+
Warning: array_flip(): Can only flip string and integer values, entry skipped in %s on line %d
8888
array(0) {
8989
}
9090
Done

0 commit comments

Comments
 (0)