Skip to content

Commit 6cebe70

Browse files
kamil-tekielanikic
authored andcommitted
Unify error messages
1 parent 1590246 commit 6cebe70

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
@@ -6461,7 +6461,7 @@ ZEND_VM_C_LABEL(num_index_dim):
64616461
} else if (UNEXPECTED(Z_TYPE_P(container) > IS_FALSE)) {
64626462
zend_throw_error(NULL, "Cannot unset offset in a non-array variable");
64636463
} else if (UNEXPECTED(Z_TYPE_P(container) == IS_FALSE)) {
6464-
zend_error(E_DEPRECATED, "Unsetting offset in a false variable is deprecated");
6464+
zend_error(E_DEPRECATED, "Automatic conversion of false to array is deprecated");
64656465
}
64666466
} while (0);
64676467

Zend/zend_vm_execute.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24551,7 +24551,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_CONST_HANDL
2455124551
} else if (UNEXPECTED(Z_TYPE_P(container) > IS_FALSE)) {
2455224552
zend_throw_error(NULL, "Cannot unset offset in a non-array variable");
2455324553
} else if (UNEXPECTED(Z_TYPE_P(container) == IS_FALSE)) {
24554-
zend_error(E_DEPRECATED, "Unsetting offset in a false variable is deprecated");
24554+
zend_error(E_DEPRECATED, "Automatic conversion of false to array is deprecated");
2455524555
}
2455624556
} while (0);
2455724557

@@ -26706,7 +26706,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_TMPVAR_HAND
2670626706
} else if (UNEXPECTED(Z_TYPE_P(container) > IS_FALSE)) {
2670726707
zend_throw_error(NULL, "Cannot unset offset in a non-array variable");
2670826708
} else if (UNEXPECTED(Z_TYPE_P(container) == IS_FALSE)) {
26709-
zend_error(E_DEPRECATED, "Unsetting offset in a false variable is deprecated");
26709+
zend_error(E_DEPRECATED, "Automatic conversion of false to array is deprecated");
2671026710
}
2671126711
} while (0);
2671226712

@@ -30704,7 +30704,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_CV_HANDLER(
3070430704
} else if (UNEXPECTED(Z_TYPE_P(container) > IS_FALSE)) {
3070530705
zend_throw_error(NULL, "Cannot unset offset in a non-array variable");
3070630706
} else if (UNEXPECTED(Z_TYPE_P(container) == IS_FALSE)) {
30707-
zend_error(E_DEPRECATED, "Unsetting offset in a false variable is deprecated");
30707+
zend_error(E_DEPRECATED, "Automatic conversion of false to array is deprecated");
3070830708
}
3070930709
} while (0);
3071030710

@@ -41816,7 +41816,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_CONST_HANDLE
4181641816
} else if (UNEXPECTED(Z_TYPE_P(container) > IS_FALSE)) {
4181741817
zend_throw_error(NULL, "Cannot unset offset in a non-array variable");
4181841818
} else if (UNEXPECTED(Z_TYPE_P(container) == IS_FALSE)) {
41819-
zend_error(E_DEPRECATED, "Unsetting offset in a false variable is deprecated");
41819+
zend_error(E_DEPRECATED, "Automatic conversion of false to array is deprecated");
4182041820
}
4182141821
} while (0);
4182241822

@@ -45263,7 +45263,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_TMPVAR_HANDL
4526345263
} else if (UNEXPECTED(Z_TYPE_P(container) > IS_FALSE)) {
4526445264
zend_throw_error(NULL, "Cannot unset offset in a non-array variable");
4526545265
} else if (UNEXPECTED(Z_TYPE_P(container) == IS_FALSE)) {
45266-
zend_error(E_DEPRECATED, "Unsetting offset in a false variable is deprecated");
45266+
zend_error(E_DEPRECATED, "Automatic conversion of false to array is deprecated");
4526745267
}
4526845268
} while (0);
4526945269

@@ -50364,7 +50364,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_CV_HANDLER(Z
5036450364
} else if (UNEXPECTED(Z_TYPE_P(container) > IS_FALSE)) {
5036550365
zend_throw_error(NULL, "Cannot unset offset in a non-array variable");
5036650366
} else if (UNEXPECTED(Z_TYPE_P(container) == IS_FALSE)) {
50367-
zend_error(E_DEPRECATED, "Unsetting offset in a false variable is deprecated");
50367+
zend_error(E_DEPRECATED, "Automatic conversion of false to array is deprecated");
5036850368
}
5036950369
} while (0);
5037050370

0 commit comments

Comments
 (0)