Skip to content

Commit 9416328

Browse files
inform the type in the array displacement error message.
1 parent dba7099 commit 9416328

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

Zend/tests/036.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ try {
1111

1212
?>
1313
--EXPECT--
14-
Illegal offset type: cannot be of type Closure
14+
Illegal offset type: cannot be of type object

Zend/tests/038.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ try {
1111

1212
?>
1313
--EXPECT--
14-
Illegal offset type: cannot be of type Closure
14+
Illegal offset type: cannot be of type object

Zend/tests/init_array_illegal_offset_type.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ try {
1212
}
1313
?>
1414
--EXPECT--
15-
Illegal offset type
15+
Illegal offset type: cannot be of type object

Zend/tests/offset_array.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ int(1)
5656

5757
Warning: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
5858
int(%d)
59-
Illegal offset type: cannot be of type stdClass
59+
Illegal offset type: cannot be of type object
6060
Illegal offset type: cannot be of type array
6161
Illegal offset type: cannot be of type array
6262
Done

Zend/zend_execute.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1442,7 +1442,7 @@ static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_use_object_as_array(v
14421442

14431443
static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_illegal_offset(const zval *offset)
14441444
{
1445-
zend_type_error("Illegal offset type: cannot be of type %s", zend_zval_type_name(offset));
1445+
zend_type_error("Illegal offset type: cannot be of type %s", zend_get_type_by_const(Z_TYPE_P(offset)));
14461446
}
14471447

14481448
static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_illegal_string_offset(const zval *offset)

ext/opcache/tests/jit/assign_dim_002.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ array(1) {
161161
int(1)
162162
}
163163
}
164-
Illegal offset type: cannot be of type Closure
164+
Illegal offset type: cannot be of type object
165165
array(1) {
166166
[0]=>
167167
array(2) {

ext/standard/tests/array/array_key_exists_variation1.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ bool(false)
129129
bool(false)
130130

131131
-- Iteration 13 --
132-
Illegal offset type
132+
Illegal offset type: cannot be of type array
133133

134134
-- Iteration 14 --
135135
bool(true)
@@ -141,7 +141,7 @@ bool(true)
141141
bool(true)
142142

143143
-- Iteration 17 --
144-
Illegal offset type
144+
Illegal offset type: cannot be of type object
145145

146146
-- Iteration 18 --
147147
bool(false)

0 commit comments

Comments
 (0)