Skip to content

Commit 6ac5cb0

Browse files
kamil-tekielanikic
authored andcommitted
Unify error messages
1 parent 3b7b091 commit 6ac5cb0

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

Zend/tests/falsetoarray.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,4 +191,4 @@ Deprecated: Automatic conversion of false to array is deprecated in %s
191191
Deprecated: Automatic conversion of false to array is deprecated in %s
192192
[023]
193193

194-
Deprecated: Unsetting offset in a false variable is deprecated in %s
194+
Deprecated: Automatic conversion of false to array is deprecated in %s

Zend/tests/unset_non_array.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ try {
9696
--EXPECTF--
9797
Warning: Undefined variable $x in %s on line %d
9898

99-
Deprecated: Unsetting offset in a false variable is deprecated in %s
99+
Deprecated: Automatic conversion of false to array is deprecated in %s
100100
Cannot unset offset in a non-array variable
101101
Cannot unset offset in a non-array variable
102102
Cannot unset offset in a non-array variable

Zend/zend_vm_def.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6471,7 +6471,7 @@ ZEND_VM_C_LABEL(num_index_dim):
64716471
} else if (UNEXPECTED(Z_TYPE_P(container) > IS_FALSE)) {
64726472
zend_throw_error(NULL, "Cannot unset offset in a non-array variable");
64736473
} else if (UNEXPECTED(Z_TYPE_P(container) == IS_FALSE)) {
6474-
zend_error(E_DEPRECATED, "Unsetting offset in a false variable is deprecated");
6474+
zend_error(E_DEPRECATED, "Automatic conversion of false to array is deprecated");
64756475
}
64766476
} while (0);
64776477

Zend/zend_vm_execute.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24590,7 +24590,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_CONST_HANDL
2459024590
} else if (UNEXPECTED(Z_TYPE_P(container) > IS_FALSE)) {
2459124591
zend_throw_error(NULL, "Cannot unset offset in a non-array variable");
2459224592
} else if (UNEXPECTED(Z_TYPE_P(container) == IS_FALSE)) {
24593-
zend_error(E_DEPRECATED, "Unsetting offset in a false variable is deprecated");
24593+
zend_error(E_DEPRECATED, "Automatic conversion of false to array is deprecated");
2459424594
}
2459524595
} while (0);
2459624596

@@ -26788,7 +26788,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_TMPVAR_HAND
2678826788
} else if (UNEXPECTED(Z_TYPE_P(container) > IS_FALSE)) {
2678926789
zend_throw_error(NULL, "Cannot unset offset in a non-array variable");
2679026790
} else if (UNEXPECTED(Z_TYPE_P(container) == IS_FALSE)) {
26791-
zend_error(E_DEPRECATED, "Unsetting offset in a false variable is deprecated");
26791+
zend_error(E_DEPRECATED, "Automatic conversion of false to array is deprecated");
2679226792
}
2679326793
} while (0);
2679426794

@@ -30828,7 +30828,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_CV_HANDLER(
3082830828
} else if (UNEXPECTED(Z_TYPE_P(container) > IS_FALSE)) {
3082930829
zend_throw_error(NULL, "Cannot unset offset in a non-array variable");
3083030830
} else if (UNEXPECTED(Z_TYPE_P(container) == IS_FALSE)) {
30831-
zend_error(E_DEPRECATED, "Unsetting offset in a false variable is deprecated");
30831+
zend_error(E_DEPRECATED, "Automatic conversion of false to array is deprecated");
3083230832
}
3083330833
} while (0);
3083430834

@@ -42094,7 +42094,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_CONST_HANDLE
4209442094
} else if (UNEXPECTED(Z_TYPE_P(container) > IS_FALSE)) {
4209542095
zend_throw_error(NULL, "Cannot unset offset in a non-array variable");
4209642096
} else if (UNEXPECTED(Z_TYPE_P(container) == IS_FALSE)) {
42097-
zend_error(E_DEPRECATED, "Unsetting offset in a false variable is deprecated");
42097+
zend_error(E_DEPRECATED, "Automatic conversion of false to array is deprecated");
4209842098
}
4209942099
} while (0);
4210042100

@@ -45585,7 +45585,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_TMPVAR_HANDL
4558545585
} else if (UNEXPECTED(Z_TYPE_P(container) > IS_FALSE)) {
4558645586
zend_throw_error(NULL, "Cannot unset offset in a non-array variable");
4558745587
} else if (UNEXPECTED(Z_TYPE_P(container) == IS_FALSE)) {
45588-
zend_error(E_DEPRECATED, "Unsetting offset in a false variable is deprecated");
45588+
zend_error(E_DEPRECATED, "Automatic conversion of false to array is deprecated");
4558945589
}
4559045590
} while (0);
4559145591

@@ -50730,7 +50730,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_CV_HANDLER(Z
5073050730
} else if (UNEXPECTED(Z_TYPE_P(container) > IS_FALSE)) {
5073150731
zend_throw_error(NULL, "Cannot unset offset in a non-array variable");
5073250732
} else if (UNEXPECTED(Z_TYPE_P(container) == IS_FALSE)) {
50733-
zend_error(E_DEPRECATED, "Unsetting offset in a false variable is deprecated");
50733+
zend_error(E_DEPRECATED, "Automatic conversion of false to array is deprecated");
5073450734
}
5073550735
} while (0);
5073650736

0 commit comments

Comments
 (0)