summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-08-03 11:26:54 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-08-03 14:40:50 +0200
commitc48b745f0090c944e77c1fbcfb6c4df3b54356ad (patch)
treea3bbde151685c6d5bc35e8151966d5a04505b35c
parentb9171d8a9354f8e86c43fe319f1c186c6590b2df (diff)
downloadphp-git-c48b745f0090c944e77c1fbcfb6c4df3b54356ad.tar.gz
Promote "undefined array key" notice to warning
This implements the last remaining part of the https://wiki.php.net/rfc/engine_warnings RFC. Closes GH-5927.
-rw-r--r--UPGRADING1
-rw-r--r--Zend/tests/028.phpt2
-rw-r--r--Zend/tests/array_offset.phpt8
-rw-r--r--Zend/tests/bug37667.phpt2
-rw-r--r--Zend/tests/bug52041.phpt12
-rw-r--r--Zend/tests/bug72943.phpt4
-rw-r--r--Zend/tests/bug74836.phpt4
-rw-r--r--Zend/tests/call_user_func_007.phpt2
-rw-r--r--Zend/tests/const_dereference_001.phpt2
-rw-r--r--Zend/tests/const_dereference_003.phpt2
-rw-r--r--Zend/tests/constant_expressions_arrays.phpt2
-rw-r--r--Zend/tests/dereference_001.phpt2
-rw-r--r--Zend/tests/dereference_002.phpt4
-rw-r--r--Zend/tests/dereference_013.phpt2
-rw-r--r--Zend/tests/globals_001.phpt2
-rw-r--r--Zend/tests/globals_002.phpt2
-rw-r--r--Zend/tests/globals_003.phpt2
-rw-r--r--Zend/tests/globals_004.phpt2
-rw-r--r--Zend/tests/list/list_reference_006.phpt2
-rw-r--r--Zend/tests/list_006.phpt4
-rw-r--r--Zend/tests/list_keyed_conversions.phpt2
-rw-r--r--Zend/tests/list_keyed_undefined.phpt4
-rw-r--r--Zend/tests/numeric_strings/array_offset.phpt36
-rw-r--r--Zend/tests/offset_array.phpt4
-rw-r--r--Zend/tests/unset_cv06.phpt2
-rw-r--r--Zend/zend_execute.c4
-rw-r--r--ext/opcache/jit/zend_jit_helpers.c6
-rw-r--r--ext/opcache/jit/zend_jit_x86.dasc16
-rw-r--r--ext/opcache/tests/assign_obj_op_of_fetch_dim.phpt2
-rw-r--r--ext/opcache/tests/jit/fetch_dim_rw_001.phpt4
-rw-r--r--ext/session/tests/bug24592.phpt4
-rw-r--r--ext/spl/spl_array.c22
-rw-r--r--ext/spl/tests/arrayObject___construct_basic2.phpt4
-rw-r--r--ext/spl/tests/arrayObject___construct_basic3.phpt4
-rw-r--r--ext/spl/tests/arrayObject___construct_basic4.phpt10
-rw-r--r--ext/spl/tests/arrayObject___construct_basic5.phpt10
-rw-r--r--ext/spl/tests/arrayObject_magicMethods1.phpt4
-rw-r--r--ext/spl/tests/arrayObject_magicMethods3.phpt4
-rw-r--r--ext/spl/tests/arrayObject_magicMethods4.phpt4
-rw-r--r--ext/spl/tests/arrayObject_magicMethods6.phpt4
-rw-r--r--ext/spl/tests/arrayObject_setFlags_basic1.phpt4
-rw-r--r--ext/spl/tests/array_001.phpt8
-rw-r--r--ext/spl/tests/array_010.phpt8
-rw-r--r--ext/spl/tests/bug45622.phpt2
-rw-r--r--ext/spl/tests/bug45622b.phpt4
-rw-r--r--ext/spl/tests/bug54323.phpt2
-rw-r--r--ext/spl/tests/bug62978.phpt12
-rw-r--r--ext/spl/tests/bug66127.phpt3
-rw-r--r--ext/spl/tests/bug66834.phpt2
-rw-r--r--ext/spl/tests/bug70852.phpt4
-rw-r--r--ext/spl/tests/bug74669.phpt2
-rw-r--r--ext/standard/tests/serialize/serialization_objects_002.phptbin7152 -> 7153 bytes
-rw-r--r--tests/classes/array_access_001.phpt4
-rw-r--r--tests/classes/array_access_002.phpt4
-rw-r--r--tests/lang/engine_assignExecutionOrder_002.phpt6
-rw-r--r--tests/lang/foreachLoopIterator.001.phpt2
56 files changed, 141 insertions, 139 deletions
diff --git a/UPGRADING b/UPGRADING
index 8f749b2acd..6410708bcf 100644
--- a/UPGRADING
+++ b/UPGRADING
@@ -114,6 +114,7 @@ PHP 8.0 UPGRADE NOTES
* Attempting to read an undefined variable.
* Attempting to read an undefined property.
+ * Attempting to read an undefined array key.
* Attempting to read a property of a non-object.
* Attempting to access an array index of a non-array.
* Attempting to convert an array to string.
diff --git a/Zend/tests/028.phpt b/Zend/tests/028.phpt
index e54fd5ac38..b54e533ac1 100644
--- a/Zend/tests/028.phpt
+++ b/Zend/tests/028.phpt
@@ -18,7 +18,7 @@ bool(true)
bool(true)
bool(true)
-Notice: Undefined array key 2 in %s on line %d
+Warning: Undefined array key 2 in %s on line %d
Fatal error: Uncaught Error: Value of type null is not callable in %s:%d
Stack trace:
diff --git a/Zend/tests/array_offset.phpt b/Zend/tests/array_offset.phpt
index 9243ba9cd7..6126db9748 100644
--- a/Zend/tests/array_offset.phpt
+++ b/Zend/tests/array_offset.phpt
@@ -11,11 +11,11 @@ Ensure "undefined offset" notice formats message correctly when undefined key is
echo "Done\n";
?>
--EXPECTF--
-Notice: Undefined array key -1 in %s on line %d
+Warning: Undefined array key -1 in %s on line %d
-Notice: Undefined array key -1 in %s on line %d
+Warning: Undefined array key -1 in %s on line %d
-Notice: Undefined array key -1 in %s on line 5
+Warning: Undefined array key -1 in %s on line %d
-Notice: Undefined array key -1 in %s on line 6
+Warning: Undefined array key -1 in %s on line %d
Done
diff --git a/Zend/tests/bug37667.phpt b/Zend/tests/bug37667.phpt
index 1299397d65..1b278cab65 100644
--- a/Zend/tests/bug37667.phpt
+++ b/Zend/tests/bug37667.phpt
@@ -29,7 +29,7 @@ var_dump($obj);
--EXPECTF--
string(3) "bar"
-Notice: Undefined array key 2 in %s on line %d
+Warning: Undefined array key 2 in %s on line %d
NULL
object(Test)#%d (1) {
["property":protected]=>
diff --git a/Zend/tests/bug52041.phpt b/Zend/tests/bug52041.phpt
index 0a6bd65f0d..7debab3f8b 100644
--- a/Zend/tests/bug52041.phpt
+++ b/Zend/tests/bug52041.phpt
@@ -71,23 +71,23 @@ Warning: Undefined variable $x in %s on line %d
Warning: Undefined variable $x in %s on line %d
-Notice: Undefined array key 0 in %s on line %d
+Warning: Undefined array key 0 in %s on line %d
Warning: Undefined variable $x in %s on line %d
-Notice: Undefined array key 0 in %s on line %d
+Warning: Undefined array key 0 in %s on line %d
-Notice: Undefined array key 0 in %s on line %d
+Warning: Undefined array key 0 in %s on line %d
Warning: Undefined variable $x in %s on line %d
-Notice: Undefined array key 0 in %s on line %d
+Warning: Undefined array key 0 in %s on line %d
Warning: Undefined variable $x in %s on line %d
-Notice: Undefined array key 0 in %s on line %d
+Warning: Undefined array key 0 in %s on line %d
-Notice: Undefined array key 0 in %s on line %d
+Warning: Undefined array key 0 in %s on line %d
Warning: Undefined variable $x in %s on line %d
NULL
diff --git a/Zend/tests/bug72943.phpt b/Zend/tests/bug72943.phpt
index e815473eb0..01c921b3b6 100644
--- a/Zend/tests/bug72943.phpt
+++ b/Zend/tests/bug72943.phpt
@@ -12,9 +12,9 @@ $a[0] = "t";
var_dump($array[$a]);
?>
--EXPECTF--
-Notice: Undefined array key "lest" in %s on line %d
+Warning: Undefined array key "lest" in %s on line %d
NULL
-Notice: Undefined array key "fest" in %s on line %d
+Warning: Undefined array key "fest" in %s on line %d
NULL
int(1)
diff --git a/Zend/tests/bug74836.phpt b/Zend/tests/bug74836.phpt
index 1301a60567..53b3775260 100644
--- a/Zend/tests/bug74836.phpt
+++ b/Zend/tests/bug74836.phpt
@@ -24,10 +24,10 @@ bool(true)
string(2) "42"
bool(true)
-Notice: Undefined array key "010" in %s on line %d
+Warning: Undefined array key "010" in %s on line %d
NULL
bool(false)
-Notice: Undefined array key "010" in %s on line %d
+Warning: Undefined array key "010" in %s on line %d
NULL
bool(false)
diff --git a/Zend/tests/call_user_func_007.phpt b/Zend/tests/call_user_func_007.phpt
index 4010ab1f20..08083e71a9 100644
--- a/Zend/tests/call_user_func_007.phpt
+++ b/Zend/tests/call_user_func_007.phpt
@@ -11,7 +11,7 @@ var_dump($a);
?>
--EXPECTF--
-Notice: Undefined array key 0 in %s on line %d
+Warning: Undefined array key 0 in %s on line %d
Warning: Trying to access array offset on value of type null in %s on line %d
diff --git a/Zend/tests/const_dereference_001.phpt b/Zend/tests/const_dereference_001.phpt
index 94c32444e6..9614cfece4 100644
--- a/Zend/tests/const_dereference_001.phpt
+++ b/Zend/tests/const_dereference_001.phpt
@@ -15,7 +15,7 @@ foreach (array(array(1, 2, 3))[0] as $var) {
--EXPECTF--
int(4)
-Notice: Undefined array key "foo" in %s on line %d
+Warning: Undefined array key "foo" in %s on line %d
NULL
int(6)
123
diff --git a/Zend/tests/const_dereference_003.phpt b/Zend/tests/const_dereference_003.phpt
index 5d1b377673..06c18e7169 100644
--- a/Zend/tests/const_dereference_003.phpt
+++ b/Zend/tests/const_dereference_003.phpt
@@ -15,7 +15,7 @@ foreach (array([1, 2, 3])[0] as $var) {
--EXPECTF--
int(4)
-Notice: Undefined array key "foo" in %s on line %d
+Warning: Undefined array key "foo" in %s on line %d
NULL
int(6)
123
diff --git a/Zend/tests/constant_expressions_arrays.phpt b/Zend/tests/constant_expressions_arrays.phpt
index b1f254faff..d25a97755e 100644
--- a/Zend/tests/constant_expressions_arrays.phpt
+++ b/Zend/tests/constant_expressions_arrays.phpt
@@ -32,7 +32,7 @@ int(1)
int(4)
int(1)
-Notice: Undefined array key 3 in %s on line %d
+Warning: Undefined array key 3 in %s on line %d
array(3) {
[0]=>
int(1)
diff --git a/Zend/tests/dereference_001.phpt b/Zend/tests/dereference_001.phpt
index a3f3eb9310..84c5dfee12 100644
--- a/Zend/tests/dereference_001.phpt
+++ b/Zend/tests/dereference_001.phpt
@@ -44,7 +44,7 @@ var_dump(e()['b']); // string(3) "bar"
--EXPECTF--
int(5)
-Notice: Undefined array key 0 in %s on line %d
+Warning: Undefined array key 0 in %s on line %d
NULL
int(1)
string(1) "b"
diff --git a/Zend/tests/dereference_002.phpt b/Zend/tests/dereference_002.phpt
index 1a7ad25394..6c8339bb13 100644
--- a/Zend/tests/dereference_002.phpt
+++ b/Zend/tests/dereference_002.phpt
@@ -73,10 +73,10 @@ int(1)
Warning: Trying to access array offset on value of type int in %s on line %d
NULL
-Notice: Undefined array key 4 in %s on line %d
+Warning: Undefined array key 4 in %s on line %d
NULL
-Notice: Undefined array key 3 in %s on line %d
+Warning: Undefined array key 3 in %s on line %d
Fatal error: Uncaught Error: Call to a member function bar() on null in %s:%d
Stack trace:
diff --git a/Zend/tests/dereference_013.phpt b/Zend/tests/dereference_013.phpt
index 756919f8e6..21bbb91418 100644
--- a/Zend/tests/dereference_013.phpt
+++ b/Zend/tests/dereference_013.phpt
@@ -34,5 +34,5 @@ array(1) {
int(1)
}
-Notice: Undefined array key 2 in %s on line %d
+Warning: Undefined array key 2 in %s on line %d
NULL
diff --git a/Zend/tests/globals_001.phpt b/Zend/tests/globals_001.phpt
index e71711f75c..069e88730c 100644
--- a/Zend/tests/globals_001.phpt
+++ b/Zend/tests/globals_001.phpt
@@ -26,7 +26,7 @@ string(5) "array"
int(%d)
string(%d) "%s"
-Notice: Undefined array key "PHP_SELF" in %s on line %d
+Warning: Undefined array key "PHP_SELF" in %s on line %d
NULL
Warning: Undefined variable $_SERVER in %s on line %d
diff --git a/Zend/tests/globals_002.phpt b/Zend/tests/globals_002.phpt
index 9b59bf0975..d8f9ad4aa2 100644
--- a/Zend/tests/globals_002.phpt
+++ b/Zend/tests/globals_002.phpt
@@ -29,7 +29,7 @@ string(5) "array"
int(%d)
string(%d) "%s"
-Notice: Undefined array key "PHP_SELF" in %s on line %d
+Warning: Undefined array key "PHP_SELF" in %s on line %d
NULL
Warning: Undefined variable $_SERVER in %s on line %d
diff --git a/Zend/tests/globals_003.phpt b/Zend/tests/globals_003.phpt
index 924b92bebc..6ac9d9f779 100644
--- a/Zend/tests/globals_003.phpt
+++ b/Zend/tests/globals_003.phpt
@@ -35,7 +35,7 @@ string(5) "array"
int(%d)
string(%d) "%s"
-Notice: Undefined array key "PHP_SELF" in %s on line %d
+Warning: Undefined array key "PHP_SELF" in %s on line %d
NULL
Warning: Undefined variable $_SERVER in %s on line %d
diff --git a/Zend/tests/globals_004.phpt b/Zend/tests/globals_004.phpt
index bc3850938c..27520a220c 100644
--- a/Zend/tests/globals_004.phpt
+++ b/Zend/tests/globals_004.phpt
@@ -20,7 +20,7 @@ string(5) "array"
int(%d)
string(%d) "%s"
-Notice: Undefined array key "PHP_SELF" in %s on line %d
+Warning: Undefined array key "PHP_SELF" in %s on line %d
NULL
Warning: Undefined variable $_SERVER in %s on line %d
diff --git a/Zend/tests/list/list_reference_006.phpt b/Zend/tests/list/list_reference_006.phpt
index 3ada70ed67..6dc6db4eb6 100644
--- a/Zend/tests/list/list_reference_006.phpt
+++ b/Zend/tests/list/list_reference_006.phpt
@@ -35,7 +35,7 @@ object(StorageNoRef)#1 (1) {
}
}
-Notice: Undefined array key 2 in %s on line %d
+Warning: Undefined array key 2 in %s on line %d
object(StorageNoRef)#2 (1) {
["s":"StorageNoRef":private]=>
array(2) {
diff --git a/Zend/tests/list_006.phpt b/Zend/tests/list_006.phpt
index d5a0eecc9f..18ae13c400 100644
--- a/Zend/tests/list_006.phpt
+++ b/Zend/tests/list_006.phpt
@@ -7,6 +7,6 @@ list($a, list($b, list(list($d)))) = array();
?>
--EXPECTF--
-Notice: Undefined array key 0 in %s on line %d
+Warning: Undefined array key 0 in %s on line %d
-Notice: Undefined array key 1 in %s on line %d
+Warning: Undefined array key 1 in %s on line %d
diff --git a/Zend/tests/list_keyed_conversions.phpt b/Zend/tests/list_keyed_conversions.phpt
index 04dad324d9..6b213d60f4 100644
--- a/Zend/tests/list_keyed_conversions.phpt
+++ b/Zend/tests/list_keyed_conversions.phpt
@@ -31,4 +31,4 @@ int(1)
Warning: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
-Notice: Undefined array key 1 in %s on line %d
+Warning: Undefined array key 1 in %s on line %d
diff --git a/Zend/tests/list_keyed_undefined.phpt b/Zend/tests/list_keyed_undefined.phpt
index fe1e86389a..df4aa67f13 100644
--- a/Zend/tests/list_keyed_undefined.phpt
+++ b/Zend/tests/list_keyed_undefined.phpt
@@ -14,8 +14,8 @@ var_dump($five, $duke);
?>
--EXPECTF--
-Notice: Undefined array key 5 in %s on line %d
+Warning: Undefined array key 5 in %s on line %d
-Notice: Undefined array key "duke" in %s on line %d
+Warning: Undefined array key "duke" in %s on line %d
NULL
NULL
diff --git a/Zend/tests/numeric_strings/array_offset.phpt b/Zend/tests/numeric_strings/array_offset.phpt
index 6522faea24..4bca89f04a 100644
--- a/Zend/tests/numeric_strings/array_offset.phpt
+++ b/Zend/tests/numeric_strings/array_offset.phpt
@@ -30,57 +30,57 @@ echo "Done\n";
--EXPECTF--
int(7)
-Notice: Undefined array key "7.5" in %s on line 6
+Warning: Undefined array key "7.5" in %s on line %d
NULL
-Notice: Undefined array key " 7" in %s on line 7
+Warning: Undefined array key " 7" in %s on line %d
NULL
-Notice: Undefined array key " 7.5" in %s on line 8
+Warning: Undefined array key " 7.5" in %s on line %d
NULL
-Notice: Undefined array key " 7 " in %s on line 9
+Warning: Undefined array key " 7 " in %s on line %d
NULL
-Notice: Undefined array key " 7.5 " in %s on line 10
+Warning: Undefined array key " 7.5 " in %s on line %d
NULL
-Notice: Undefined array key "7 " in %s on line 11
+Warning: Undefined array key "7 " in %s on line %d
NULL
-Notice: Undefined array key "7.5 " in %s on line 12
+Warning: Undefined array key "7.5 " in %s on line %d
NULL
-Notice: Undefined array key "7str" in %s on line 13
+Warning: Undefined array key "7str" in %s on line %d
NULL
-Notice: Undefined array key "7.5str" in %s on line 14
+Warning: Undefined array key "7.5str" in %s on line %d
NULL
-Notice: Undefined array key " 7str" in %s on line 15
+Warning: Undefined array key " 7str" in %s on line %d
NULL
-Notice: Undefined array key " 7.5str" in %s on line 16
+Warning: Undefined array key " 7.5str" in %s on line %d
NULL
-Notice: Undefined array key " 7 str" in %s on line 17
+Warning: Undefined array key " 7 str" in %s on line %d
NULL
-Notice: Undefined array key " 7.5 str" in %s on line 18
+Warning: Undefined array key " 7.5 str" in %s on line %d
NULL
-Notice: Undefined array key "7 str" in %s on line 19
+Warning: Undefined array key "7 str" in %s on line %d
NULL
-Notice: Undefined array key "7.5 str" in %s on line 20
+Warning: Undefined array key "7.5 str" in %s on line %d
NULL
-Notice: Undefined array key "0xA" in %s on line 21
+Warning: Undefined array key "0xA" in %s on line %d
NULL
-Notice: Undefined array key "0b10" in %s on line 22
+Warning: Undefined array key "0b10" in %s on line %d
NULL
-Notice: Undefined array key "07" in %s on line 23
+Warning: Undefined array key "07" in %s on line %d
NULL
Done
diff --git a/Zend/tests/offset_array.phpt b/Zend/tests/offset_array.phpt
index 24a3d55d3c..bd6baa1651 100644
--- a/Zend/tests/offset_array.phpt
+++ b/Zend/tests/offset_array.phpt
@@ -36,10 +36,10 @@ echo "Done\n";
int(2)
int(1)
-Notice: Undefined array key "" in %s on line %d
+Warning: Undefined array key "" in %s on line %d
NULL
-Notice: Undefined array key "run away" in %s on line %d
+Warning: Undefined array key "run away" in %s on line %d
NULL
int(2)
int(1)
diff --git a/Zend/tests/unset_cv06.phpt b/Zend/tests/unset_cv06.phpt
index 9de91c535d..d4f3852658 100644
--- a/Zend/tests/unset_cv06.phpt
+++ b/Zend/tests/unset_cv06.phpt
@@ -18,5 +18,5 @@ echo "ok\n";
--EXPECTF--
1
-Notice: Undefined array key "x" in %s on line %d
+Warning: Undefined array key "x" in %s on line %d
ok
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index b89809c88a..7d2a960cb5 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -1892,12 +1892,12 @@ static zend_always_inline HashTable *zend_get_target_symbol_table(int fetch_type
static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_undefined_offset(zend_long lval)
{
- zend_error(E_NOTICE, "Undefined array key " ZEND_LONG_FMT, lval);
+ zend_error(E_WARNING, "Undefined array key " ZEND_LONG_FMT, lval);
}
static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_undefined_index(const zend_string *offset)
{
- zend_error(E_NOTICE, "Undefined array key \"%s\"", ZSTR_VAL(offset));
+ zend_error(E_WARNING, "Undefined array key \"%s\"", ZSTR_VAL(offset));
}
ZEND_API ZEND_COLD int ZEND_FASTCALL zend_undefined_offset_write(HashTable *ht, zend_long lval)
diff --git a/ext/opcache/jit/zend_jit_helpers.c b/ext/opcache/jit/zend_jit_helpers.c
index eae7491c51..d1beed9115 100644
--- a/ext/opcache/jit/zend_jit_helpers.c
+++ b/ext/opcache/jit/zend_jit_helpers.c
@@ -368,13 +368,13 @@ str_index:
if (UNEXPECTED(Z_TYPE_P(retval) == IS_INDIRECT)) {
retval = Z_INDIRECT_P(retval);
if (UNEXPECTED(Z_TYPE_P(retval) == IS_UNDEF)) {
- zend_error(E_NOTICE, "Undefined array key \"%s\"", ZSTR_VAL(offset_key));
+ zend_error(E_WARNING, "Undefined array key \"%s\"", ZSTR_VAL(offset_key));
ZVAL_NULL(result);
return;
}
}
} else {
- zend_error(E_NOTICE, "Undefined array key \"%s\"", ZSTR_VAL(offset_key));
+ zend_error(E_WARNING, "Undefined array key \"%s\"", ZSTR_VAL(offset_key));
ZVAL_NULL(result);
return;
}
@@ -387,7 +387,7 @@ num_index:
return;
num_undef:
- zend_error(E_NOTICE,"Undefined array key " ZEND_LONG_FMT, hval);
+ zend_error(E_WARNING, "Undefined array key " ZEND_LONG_FMT, hval);
ZVAL_NULL(result);
}
diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc
index 561d6f937d..32bd3b4677 100644
--- a/ext/opcache/jit/zend_jit_x86.dasc
+++ b/ext/opcache/jit/zend_jit_x86.dasc
@@ -1923,13 +1923,13 @@ static int zend_jit_undefined_offset_stub(dasm_State **Dst)
| add r0, FP
|3:
|.if X64WIN
- | mov CARG1, E_NOTICE
+ | mov CARG1, E_WARNING
| LOAD_ADDR CARG2, "Undefined array key " ZEND_LONG_FMT
| mov CARG3, aword [r0]
| EXT_CALL zend_error, r0
| add r4, 0x28 // stack alignment
|.elif X64
- | mov CARG1, E_NOTICE
+ | mov CARG1, E_WARNING
| LOAD_ADDR CARG2, "Undefined array key " ZEND_LONG_FMT
| mov CARG3, aword [r0]
| EXT_CALL zend_error, r0
@@ -1938,7 +1938,7 @@ static int zend_jit_undefined_offset_stub(dasm_State **Dst)
| sub r4, 4
| push aword [r0]
| push "Undefined array key " ZEND_LONG_FMT
- | push E_NOTICE
+ | push E_WARNING
| EXT_CALL zend_error, r0
| add r4, 28
|.endif
@@ -1991,14 +1991,14 @@ static int zend_jit_undefined_index_stub(dasm_State **Dst)
| add r0, FP
|3:
|.if X64WIN
- | mov CARG1, E_NOTICE
+ | mov CARG1, E_WARNING
| LOAD_ADDR CARG2, "Undefined array key \"%s\""
| mov CARG3, aword [r0]
| add CARG3, offsetof(zend_string, val)
| EXT_CALL zend_error, r0
| add r4, 0x28
|.elif X64
- | mov CARG1, E_NOTICE
+ | mov CARG1, E_WARNING
| LOAD_ADDR CARG2, "Undefined array key \"%s\""
| mov CARG3, aword [r0]
| add CARG3, offsetof(zend_string, val)
@@ -2010,7 +2010,7 @@ static int zend_jit_undefined_index_stub(dasm_State **Dst)
| add r0, offsetof(zend_string, val)
| push r0
| push "Undefined array key \"%s\""
- | push E_NOTICE
+ | push E_WARNING
| EXT_CALL zend_error, r0
| add r4, 28
|.endif
@@ -5084,7 +5084,7 @@ static int zend_jit_fetch_dimension_address_inner(dasm_State **Dst, const zend_o
switch (type) {
case BP_VAR_R:
if (JIT_G(trigger) != ZEND_JIT_ON_HOT_TRACE) {
- | // zend_error(E_NOTICE,"Undefined array key " ZEND_LONG_FMT, hval);
+ | // zend_error(E_WARNING,"Undefined array key " ZEND_LONG_FMT, hval);
| // retval = &EG(uninitialized_zval);
| UNDEFINED_OFFSET opline
| jmp >9
@@ -5214,7 +5214,7 @@ static int zend_jit_fetch_dimension_address_inner(dasm_State **Dst, const zend_o
switch (type) {
case BP_VAR_R:
if (JIT_G(trigger) != ZEND_JIT_ON_HOT_TRACE) {
- // zend_error(E_NOTICE, "Undefined array key \"%s\"", ZSTR_VAL(offset_key));
+ // zend_error(E_WARNING, "Undefined array key \"%s\"", ZSTR_VAL(offset_key));
| UNDEFINED_INDEX opline
| jmp >9
} else {
diff --git a/ext/opcache/tests/assign_obj_op_of_fetch_dim.phpt b/ext/opcache/tests/assign_obj_op_of_fetch_dim.phpt
index 1cc55b4001..5368cfbd18 100644
--- a/ext/opcache/tests/assign_obj_op_of_fetch_dim.phpt
+++ b/ext/opcache/tests/assign_obj_op_of_fetch_dim.phpt
@@ -16,5 +16,5 @@ try {
?>
--EXPECTF--
-Notice: Undefined array key 0 in %s on line %d
+Warning: Undefined array key 0 in %s on line %d
Attempt to assign property "y" on null
diff --git a/ext/opcache/tests/jit/fetch_dim_rw_001.phpt b/ext/opcache/tests/jit/fetch_dim_rw_001.phpt
index 9967896d1f..ffb869fe84 100644
--- a/ext/opcache/tests/jit/fetch_dim_rw_001.phpt
+++ b/ext/opcache/tests/jit/fetch_dim_rw_001.phpt
@@ -18,9 +18,9 @@ var_dump(foo());
--EXPECTF--
Warning: Undefined variable $a in %s on line %d
-Notice: Undefined array key 0 in %sfetch_dim_rw_001.php on line 3
+Warning: Undefined array key 0 in %sfetch_dim_rw_001.php on line 3
-Notice: Undefined array key 0 in %sfetch_dim_rw_001.php on line 3
+Warning: Undefined array key 0 in %sfetch_dim_rw_001.php on line 3
array(1) {
[0]=>
int(2)
diff --git a/ext/session/tests/bug24592.phpt b/ext/session/tests/bug24592.phpt
index c4e9ee77eb..6dce774208 100644
--- a/ext/session/tests/bug24592.phpt
+++ b/ext/session/tests/bug24592.phpt
@@ -20,9 +20,9 @@ $_SESSION['bar'] = $bar;
var_dump($_SESSION);
?>
--EXPECTF--
-Notice: Undefined array key "foo" in %s on line %d
+Warning: Undefined array key "foo" in %s on line %d
-Notice: Undefined array key "bar" in %s on line %d
+Warning: Undefined array key "bar" in %s on line %d
NULL
NULL
array(0) {
diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c
index 67539b1745..e527f9e4f3 100644
--- a/ext/spl/spl_array.c
+++ b/ext/spl/spl_array.c
@@ -306,13 +306,13 @@ fetch_dim_string:
if (Z_TYPE_P(retval) == IS_UNDEF) {
switch (type) {
case BP_VAR_R:
- zend_error(E_NOTICE, "Undefined array key \"%s\"", ZSTR_VAL(offset_key));
+ zend_error(E_WARNING, "Undefined array key \"%s\"", ZSTR_VAL(offset_key));
case BP_VAR_UNSET:
case BP_VAR_IS:
retval = &EG(uninitialized_zval);
break;
case BP_VAR_RW:
- zend_error(E_NOTICE,"Undefined array key \"%s\"", ZSTR_VAL(offset_key));
+ zend_error(E_WARNING,"Undefined array key \"%s\"", ZSTR_VAL(offset_key));
case BP_VAR_W: {
ZVAL_NULL(retval);
}
@@ -322,13 +322,13 @@ fetch_dim_string:
} else {
switch (type) {
case BP_VAR_R:
- zend_error(E_NOTICE, "Undefined array key \"%s\"", ZSTR_VAL(offset_key));
+ zend_error(E_WARNING, "Undefined array key \"%s\"", ZSTR_VAL(offset_key));
case BP_VAR_UNSET:
case BP_VAR_IS:
retval = &EG(uninitialized_zval);
break;
case BP_VAR_RW:
- zend_error(E_NOTICE,"Undefined array key \"%s\"", ZSTR_VAL(offset_key));
+ zend_error(E_WARNING,"Undefined array key \"%s\"", ZSTR_VAL(offset_key));
case BP_VAR_W: {
zval value;
ZVAL_NULL(&value);
@@ -356,13 +356,13 @@ num_index:
if ((retval = zend_hash_index_find(ht, index)) == NULL) {
switch (type) {
case BP_VAR_R:
- zend_error(E_NOTICE, "Undefined array key " ZEND_LONG_FMT, index);
+ zend_error(E_WARNING, "Undefined array key " ZEND_LONG_FMT, index);
case BP_VAR_UNSET:
case BP_VAR_IS:
retval = &EG(uninitialized_zval);
break;
case BP_VAR_RW:
- zend_error(E_NOTICE, "Undefined array key " ZEND_LONG_FMT, index);
+ zend_error(E_WARNING, "Undefined array key " ZEND_LONG_FMT, index);
case BP_VAR_W: {
zval value;
ZVAL_UNDEF(&value);
@@ -534,7 +534,7 @@ try_again:
ht = spl_array_get_hash_table(intern);
if (ht == &EG(symbol_table)) {
if (zend_delete_global_variable(Z_STR_P(offset))) {
- zend_error(E_NOTICE,"Undefined array key \"%s\"", Z_STRVAL_P(offset));
+ zend_error(E_WARNING,"Undefined array key \"%s\"", Z_STRVAL_P(offset));
}
} else {
zval *data = zend_symtable_find(ht, Z_STR_P(offset));
@@ -543,7 +543,7 @@ try_again:
if (Z_TYPE_P(data) == IS_INDIRECT) {
data = Z_INDIRECT_P(data);
if (Z_TYPE_P(data) == IS_UNDEF) {
- zend_error(E_NOTICE,"Undefined array key \"%s\"", Z_STRVAL_P(offset));
+ zend_error(E_WARNING,"Undefined array key \"%s\"", Z_STRVAL_P(offset));
} else {
zval_ptr_dtor(data);
ZVAL_UNDEF(data);
@@ -554,10 +554,10 @@ try_again:
}
}
} else if (zend_symtable_del(ht, Z_STR_P(offset)) == FAILURE) {
- zend_error(E_NOTICE,"Undefined array key \"%s\"", Z_STRVAL_P(offset));
+ zend_error(E_WARNING,"Undefined array key \"%s\"", Z_STRVAL_P(offset));
}
} else {
- zend_error(E_NOTICE,"Undefined array key \"%s\"", Z_STRVAL_P(offset));
+ zend_error(E_WARNING,"Undefined array key \"%s\"", Z_STRVAL_P(offset));
}
}
break;
@@ -578,7 +578,7 @@ try_again:
num_index:
ht = spl_array_get_hash_table(intern);
if (zend_hash_index_del(ht, index) == FAILURE) {
- zend_error(E_NOTICE,"Undefined array key " ZEND_LONG_FMT, index);
+ zend_error(E_WARNING,"Undefined array key " ZEND_LONG_FMT, index);
}
break;
case IS_REFERENCE:
diff --git a/ext/spl/tests/arrayObject___construct_basic2.phpt b/ext/spl/tests/arrayObject___construct_basic2.phpt
index 33f0a68eb9..4de3137080 100644
--- a/ext/spl/tests/arrayObject___construct_basic2.phpt
+++ b/ext/spl/tests/arrayObject___construct_basic2.phpt
@@ -63,7 +63,7 @@ bool(true)
Warning: Undefined property: ArrayObject::$prop in %s on line %d
-Notice: Undefined array key "prop" in %s on line %d
+Warning: Undefined array key "prop" in %s on line %d
NULL
NULL
- After:
@@ -91,7 +91,7 @@ bool(true)
Warning: Undefined property: MyArrayObject::$prop in %s on line %d
-Notice: Undefined array key "prop" in %s on line %d
+Warning: Undefined array key "prop" in %s on line %d
NULL
NULL
- After:
diff --git a/ext/spl/tests/arrayObject___construct_basic3.phpt b/ext/spl/tests/arrayObject___construct_basic3.phpt
index 3ac7e0a75a..1d6015ce6a 100644
--- a/ext/spl/tests/arrayObject___construct_basic3.phpt
+++ b/ext/spl/tests/arrayObject___construct_basic3.phpt
@@ -63,7 +63,7 @@ bool(true)
Warning: Undefined property: ArrayObject::$prop in %s on line %d
-Notice: Undefined array key "prop" in %s on line %d
+Warning: Undefined array key "prop" in %s on line %d
NULL
NULL
- After:
@@ -91,7 +91,7 @@ bool(true)
Warning: Undefined property: MyArrayObject::$prop in %s on line %d
-Notice: Undefined array key "prop" in %s on line %d
+Warning: Undefined array key "prop" in %s on line %d
NULL
NULL
- After:
diff --git a/ext/spl/tests/arrayObject___construct_basic4.phpt b/ext/spl/tests/arrayObject___construct_basic4.phpt
index 89069ec871..b8451ab2b3 100644
--- a/ext/spl/tests/arrayObject___construct_basic4.phpt
+++ b/ext/spl/tests/arrayObject___construct_basic4.phpt
@@ -61,11 +61,11 @@ bool(true)
bool(true)
- Unset:
-Notice: Undefined array key "prop" in %s on line %d
+Warning: Undefined array key "prop" in %s on line %d
-Notice: Undefined array key "prop" in %s on line %d
+Warning: Undefined array key "prop" in %s on line %d
-Notice: Undefined array key "prop" in %s on line %d
+Warning: Undefined array key "prop" in %s on line %d
NULL
NULL
- After:
@@ -91,9 +91,9 @@ bool(true)
bool(true)
- Unset:
-Notice: Undefined array key "prop" in %s on line %d
+Warning: Undefined array key "prop" in %s on line %d
-Notice: Undefined array key "prop" in %s on line %d
+Warning: Undefined array key "prop" in %s on line %d
NULL
NULL
- After:
diff --git a/ext/spl/tests/arrayObject___construct_basic5.phpt b/ext/spl/tests/arrayObject___construct_basic5.phpt
index a382c7bfc5..21a5354064 100644
--- a/ext/spl/tests/arrayObject___construct_basic5.phpt
+++ b/ext/spl/tests/arrayObject___construct_basic5.phpt
@@ -61,11 +61,11 @@ bool(true)
bool(true)
- Unset:
-Notice: Undefined array key "prop" in %s on line %d
+Warning: Undefined array key "prop" in %s on line %d
-Notice: Undefined array key "prop" in %s on line %d
+Warning: Undefined array key "prop" in %s on line %d
-Notice: Undefined array key "prop" in %s on line %d
+Warning: Undefined array key "prop" in %s on line %d
NULL
NULL
- After:
@@ -91,9 +91,9 @@ bool(true)
bool(true)
- Unset:
-Notice: Undefined array key "prop" in %s on line %d
+Warning: Undefined array key "prop" in %s on line %d
-Notice: Undefined array key "prop" in %s on line %d
+Warning: Undefined array key "prop" in %s on line %d
NULL
NULL
- After:
diff --git a/ext/spl/tests/arrayObject_magicMethods1.phpt b/ext/spl/tests/arrayObject_magicMethods1.phpt
index a9acf72ff7..14d25ffd29 100644
--- a/ext/spl/tests/arrayObject_magicMethods1.phpt
+++ b/ext/spl/tests/arrayObject_magicMethods1.phpt
@@ -102,7 +102,7 @@ object(ArrayObject)#2 (1) {
--> Read existent, non-existent and dynamic:
string(7) "changed"
-Notice: Undefined array key "nonexistent" in %s on line %d
+Warning: Undefined array key "nonexistent" in %s on line %d
NULL
string(11) "new.changed"
Original wrapped object:
@@ -171,7 +171,7 @@ object(ArrayObject)#2 (1) {
--> Unset existent, non-existent and dynamic:
-Notice: Undefined array key "nonexistent" in %s on line %d
+Warning: Undefined array key "nonexistent" in %s on line %d
Original wrapped object:
object(UsesMagic)#1 (3) {
["b"]=>
diff --git a/ext/spl/tests/arrayObject_magicMethods3.phpt b/ext/spl/tests/arrayObject_magicMethods3.phpt
index adca465525..4f05f57771 100644
--- a/ext/spl/tests/arrayObject_magicMethods3.phpt
+++ b/ext/spl/tests/arrayObject_magicMethods3.phpt
@@ -102,7 +102,7 @@ object(ArrayObject)#2 (1) {
--> Read existent, non-existent and dynamic:
string(7) "changed"
-Notice: Undefined array key "nonexistent" in %s on line %d
+Warning: Undefined array key "nonexistent" in %s on line %d
NULL
string(11) "new.changed"
Original wrapped object:
@@ -171,7 +171,7 @@ object(ArrayObject)#2 (1) {
--> Unset existent, non-existent and dynamic:
-Notice: Undefined array key "nonexistent" in %s on line %d
+Warning: Undefined array key "nonexistent" in %s on line %d
Original wrapped object:
object(UsesMagic)#1 (3) {
["b"]=>
diff --git a/ext/spl/tests/arrayObject_magicMethods4.phpt b/ext/spl/tests/arrayObject_magicMethods4.phpt
index 5227e729af..b209dc8eed 100644
--- a/ext/spl/tests/arrayObject_magicMethods4.phpt
+++ b/ext/spl/tests/arrayObject_magicMethods4.phpt
@@ -107,7 +107,7 @@ object(UsesMagic)#2 (2) {
--> Read existent, non-existent and dynamic:
string(7) "changed"
-Notice: Undefined array key "nonexistent" in %s on line %d
+Warning: Undefined array key "nonexistent" in %s on line %d
NULL
string(11) "new.changed"
Original wrapped object:
@@ -180,7 +180,7 @@ object(UsesMagic)#2 (2) {
--> Unset existent, non-existent and dynamic:
-Notice: Undefined array key "nonexistent" in %s on line %d
+Warning: Undefined array key "nonexistent" in %s on line %d
Original wrapped object:
object(C)#1 (3) {
["b"]=>
diff --git a/ext/spl/tests/arrayObject_magicMethods6.phpt b/ext/spl/tests/arrayObject_magicMethods6.phpt
index d7bf712441..b655e5e8f8 100644
--- a/ext/spl/tests/arrayObject_magicMethods6.phpt
+++ b/ext/spl/tests/arrayObject_magicMethods6.phpt
@@ -107,7 +107,7 @@ object(UsesMagic)#2 (2) {
--> Read existent, non-existent and dynamic:
string(7) "changed"
-Notice: Undefined array key "nonexistent" in %s on line %d
+Warning: Undefined array key "nonexistent" in %s on line %d
NULL
string(11) "new.changed"
Original wrapped object:
@@ -180,7 +180,7 @@ object(UsesMagic)#2 (2) {
--> Unset existent, non-existent and dynamic:
-Notice: Undefined array key "nonexistent" in %s on line %d
+Warning: Undefined array key "nonexistent" in %s on line %d
Original wrapped object:
object(C)#1 (3) {
["b"]=>
diff --git a/ext/spl/tests/arrayObject_setFlags_basic1.phpt b/ext/spl/tests/arrayObject_setFlags_basic1.phpt
index 3155390834..a23018e5e1 100644
--- a/ext/spl/tests/arrayObject_setFlags_basic1.phpt
+++ b/ext/spl/tests/arrayObject_setFlags_basic1.phpt
@@ -44,8 +44,8 @@ string(21) "array element.changed"
--> Remove the array element and try access again:
bool(false)
-Notice: Undefined array key "p" in %s on line %d
+Warning: Undefined array key "p" in %s on line %d
NULL
-Notice: Undefined array key "p" in %s on line %d
+Warning: Undefined array key "p" in %s on line %d
string(8) ".changed"
diff --git a/ext/spl/tests/array_001.phpt b/ext/spl/tests/array_001.phpt
index defb313f13..065c68a949 100644
--- a/ext/spl/tests/array_001.phpt
+++ b/ext/spl/tests/array_001.phpt
@@ -77,15 +77,15 @@ object(ArrayObject)#%d (1) {
}
int(0)
-Notice: Undefined array key 6 in %s on line %d
+Warning: Undefined array key 6 in %s on line %d
NULL
-Notice: Undefined array key "b" in %s on line %d
+Warning: Undefined array key "b" in %s on line %d
NULL
-Notice: Undefined array key 7 in %s on line %d
+Warning: Undefined array key 7 in %s on line %d
-Notice: Undefined array key "c" in %s on line %d
+Warning: Undefined array key "c" in %s on line %d
object(ArrayObject)#%d (1) {
["storage":"ArrayObject":private]=>
array(2) {
diff --git a/ext/spl/tests/array_010.phpt b/ext/spl/tests/array_010.phpt
index 27ba612a21..c826e7a0cd 100644
--- a/ext/spl/tests/array_010.phpt
+++ b/ext/spl/tests/array_010.phpt
@@ -92,10 +92,10 @@ int(1)
string(3) "3rd"
int(4)
-Notice: Undefined array key "5th" in %sarray_010.php on line %d
+Warning: Undefined array key "5th" in %s on line %d
NULL
-Notice: Undefined array key 6 in %sarray_010.php on line %d
+Warning: Undefined array key 6 in %s on line %d
NULL
===offsetSet===
WRITE 1
@@ -126,9 +126,9 @@ array(6) {
string(9) "changed 6"
}
-Notice: Undefined array key 7 in %sarray_010.php on line %d
+Warning: Undefined array key 7 in %s on line %d
-Notice: Undefined array key "8th" in %sarray_010.php on line %d
+Warning: Undefined array key "8th" in %s on line %d
array(4) {
[0]=>
string(3) "1st"
diff --git a/ext/spl/tests/bug45622.phpt b/ext/spl/tests/bug45622.phpt
index 4e1f586315..7461e39189 100644
--- a/ext/spl/tests/bug45622.phpt
+++ b/ext/spl/tests/bug45622.phpt
@@ -41,7 +41,7 @@ string(13) "array element"
--> Remove the array element and try access again:
bool(false)
-Notice: Undefined array key "p" in %s on line %d
+Warning: Undefined array key "p" in %s on line %d
NULL
--> Re-add the real property:
diff --git a/ext/spl/tests/bug45622b.phpt b/ext/spl/tests/bug45622b.phpt
index caaee5ea8e..9516fe7a56 100644
--- a/ext/spl/tests/bug45622b.phpt
+++ b/ext/spl/tests/bug45622b.phpt
@@ -25,9 +25,9 @@ isset($ao->prop4);
--EXPECTF--
Doesn't trigger __get.
-Notice: Undefined array key "prop1" in %s on line %d
+Warning: Undefined array key "prop1" in %s on line %d
Doesn't trigger __set.
Doesn't trigger __unset.
-Notice: Undefined array key "prop3" in %s on line %d
+Warning: Undefined array key "prop3" in %s on line %d
Shouldn't trigger __isset.
diff --git a/ext/spl/tests/bug54323.phpt b/ext/spl/tests/bug54323.phpt
index ce755f10c0..2ce165fd42 100644
--- a/ext/spl/tests/bug54323.phpt
+++ b/ext/spl/tests/bug54323.phpt
@@ -19,6 +19,6 @@ function testAccess($c, $ao) {
--EXPECTF--
Warning: Undefined property: C::$prop in %s on line %d
-Notice: Undefined array key "prop" in %sbug54323.php on line 14
+Warning: Undefined array key "prop" in %s on line %d
NULL
NULL
diff --git a/ext/spl/tests/bug62978.phpt b/ext/spl/tests/bug62978.phpt
index 6da5b85a17..8a5013ce08 100644
--- a/ext/spl/tests/bug62978.phpt
+++ b/ext/spl/tests/bug62978.phpt
@@ -25,10 +25,10 @@ var_dump($a[$fp]);
fclose($fp);
--EXPECTF--
-Notice: Undefined array key "epic_magic" in %s on line %d
+Warning: Undefined array key "epic_magic" in %s on line %d
NULL
-Notice: Undefined array key "epic_magic" in %s on line %d
+Warning: Undefined array key "epic_magic" in %s on line %d
NULL
Warning: Undefined variable $c in %s on line %d
@@ -36,17 +36,17 @@ Warning: Undefined variable $c in %s on line %d
Warning: Trying to access array offset on value of type null in %s on line %d
NULL
-Notice: Undefined array key "epic_magic" in %s on line %d
+Warning: Undefined array key "epic_magic" in %s on line %d
NULL
-Notice: Undefined array key "epic_magic" in %s on line %d
+Warning: Undefined array key "epic_magic" in %s on line %d
NULL
-Notice: Undefined array key "epic_magic" in %s on line %d
+Warning: Undefined array key "epic_magic" in %s on line %d
NULL
bool(false)
Warning: Resource ID#%d used as offset, casting to integer (%d) in %sbug62978.php on line %d
-Notice: Undefined array key %d in %sbug62978.php on line %d
+Warning: Undefined array key 5 in %s on line %d
NULL
diff --git a/ext/spl/tests/bug66127.phpt b/ext/spl/tests/bug66127.phpt
index b5d1dcac4b..d6b78ae497 100644
--- a/ext/spl/tests/bug66127.phpt
+++ b/ext/spl/tests/bug66127.phpt
@@ -21,5 +21,6 @@ unset($items[0][0]);
crash();
echo "Worked!\n";
?>
---EXPECT--
+--EXPECTF--
+Warning: Undefined array key 0 in %s on line %d
Worked!
diff --git a/ext/spl/tests/bug66834.phpt b/ext/spl/tests/bug66834.phpt
index 72d5ef52a2..c47a7f6263 100644
--- a/ext/spl/tests/bug66834.phpt
+++ b/ext/spl/tests/bug66834.phpt
@@ -150,7 +150,7 @@ bool(false)
bool(true)
==== class with offsetGet() and offsetSet() ====
-Notice: Undefined array key "foo" in %s on line %d
+Warning: Undefined array key "foo" in %s on line %d
bool(false)
bool(true)
bool(false)
diff --git a/ext/spl/tests/bug70852.phpt b/ext/spl/tests/bug70852.phpt
index 5869e624d0..44168f9903 100644
--- a/ext/spl/tests/bug70852.phpt
+++ b/ext/spl/tests/bug70852.phpt
@@ -8,8 +8,8 @@ var_dump($y[NULL]);
var_dump($y[NULL]++);
?>
--EXPECTF--
-Notice: Undefined array key "" in %s on line %d
+Warning: Undefined array key "" in %s on line %d
NULL
-Notice: Undefined array key "" in %s on line %d
+Warning: Undefined array key "" in %s on line %d
NULL
diff --git a/ext/spl/tests/bug74669.phpt b/ext/spl/tests/bug74669.phpt
index 05fa4e415b..98e9c88672 100644
--- a/ext/spl/tests/bug74669.phpt
+++ b/ext/spl/tests/bug74669.phpt
@@ -98,7 +98,7 @@ var_dump($selfArray['foo']);
0 => test1
1 => test2
-Notice: Undefined array key "foo" in %s on line %d
+Warning: Undefined array key "foo" in %s on line %d
NULL
object(SelfArray)#9 (1) {
["foo"]=>
diff --git a/ext/standard/tests/serialize/serialization_objects_002.phpt b/ext/standard/tests/serialize/serialization_objects_002.phpt
index ce9ad53f7a..a703af0c8f 100644
--- a/ext/standard/tests/serialize/serialization_objects_002.phpt
+++ b/ext/standard/tests/serialize/serialization_objects_002.phpt
Binary files differ
diff --git a/tests/classes/array_access_001.phpt b/tests/classes/array_access_001.phpt
index 87da97ac20..8e70b87f67 100644
--- a/tests/classes/array_access_001.phpt
+++ b/tests/classes/array_access_001.phpt
@@ -134,11 +134,11 @@ ObjectOne::offsetGet(4th)
int(4)
ObjectOne::offsetGet(5th)
-Notice: Undefined array key "5th" in %s on line %d
+Warning: Undefined array key "5th" in %s on line %d
NULL
ObjectOne::offsetGet(6)
-Notice: Undefined array key 6 in %s on line %d
+Warning: Undefined array key 6 in %s on line %d
NULL
===offsetSet===
WRITE 1
diff --git a/tests/classes/array_access_002.phpt b/tests/classes/array_access_002.phpt
index 0f12811b49..7217eaf8ba 100644
--- a/tests/classes/array_access_002.phpt
+++ b/tests/classes/array_access_002.phpt
@@ -134,11 +134,11 @@ ObjectOne::offsetGet(4th)
int(4)
ObjectOne::offsetGet(5th)
-Notice: Undefined array key "5th" in %s on line %d
+Warning: Undefined array key "5th" in %s on line %d
NULL
ObjectOne::offsetGet(6)
-Notice: Undefined array key 6 in %s on line %d
+Warning: Undefined array key 6 in %s on line %d
NULL
===offsetSet===
WRITE 1
diff --git a/tests/lang/engine_assignExecutionOrder_002.phpt b/tests/lang/engine_assignExecutionOrder_002.phpt
index f9f418d12e..956e3f9066 100644
--- a/tests/lang/engine_assignExecutionOrder_002.phpt
+++ b/tests/lang/engine_assignExecutionOrder_002.phpt
@@ -119,12 +119,12 @@ L=100 M=200 N=300
O= and P=
10 20 40 50 60 70 80
-Notice: Undefined array key 0 in %s on line %d
+Warning: Undefined array key 0 in %s on line %d
-Notice: Undefined array key 1 in %s on line %d
+Warning: Undefined array key 1 in %s on line %d
Y=,Z=
-Notice: Undefined array key 1 in %s on line %d
+Warning: Undefined array key 1 in %s on line %d
AA=10
CC=10 DD=30
Array
diff --git a/tests/lang/foreachLoopIterator.001.phpt b/tests/lang/foreachLoopIterator.001.phpt
index 5293ef9d21..ec84980524 100644
--- a/tests/lang/foreachLoopIterator.001.phpt
+++ b/tests/lang/foreachLoopIterator.001.phpt
@@ -128,5 +128,5 @@ meal 0 => breakfast
--> MealIterator::valid (3)
--> MealIterator::next (3)
-Notice: Undefined array key 3 in %s on line %d
+Warning: Undefined array key 3 in %s on line %d
--> MealIterator::valid (4)