mirror of
https://github.com/php/php-src.git
synced 2025-08-16 22:18:50 +02:00
Merge branch 'PHP-8.0'
* PHP-8.0: Fix parameter name in count() error message
This commit is contained in:
commit
9e66455fbc
6 changed files with 17 additions and 18 deletions
|
@ -15,4 +15,4 @@ try {
|
||||||
|
|
||||||
?>
|
?>
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
count(): Argument #1 ($var) must be of type Countable|array, Generator given
|
count(): Argument #1 ($value) must be of type Countable|array, Generator given
|
||||||
|
|
|
@ -9042,7 +9042,7 @@ ZEND_VM_COLD_CONST_HANDLER(190, ZEND_COUNT, CONST|TMPVAR|CV, UNUSED)
|
||||||
ZVAL_UNDEFINED_OP1();
|
ZVAL_UNDEFINED_OP1();
|
||||||
}
|
}
|
||||||
count = 0;
|
count = 0;
|
||||||
zend_type_error("%s(): Argument #1 ($var) must be of type Countable|array, %s given", opline->extended_value ? "sizeof" : "count", zend_zval_type_name(op1));
|
zend_type_error("%s(): Argument #1 ($value) must be of type Countable|array, %s given", opline->extended_value ? "sizeof" : "count", zend_zval_type_name(op1));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10542,7 +10542,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COUNT_SPEC_CONST_
|
||||||
ZVAL_UNDEFINED_OP1();
|
ZVAL_UNDEFINED_OP1();
|
||||||
}
|
}
|
||||||
count = 0;
|
count = 0;
|
||||||
zend_type_error("%s(): Argument #1 ($var) must be of type Countable|array, %s given", opline->extended_value ? "sizeof" : "count", zend_zval_type_name(op1));
|
zend_type_error("%s(): Argument #1 ($value) must be of type Countable|array, %s given", opline->extended_value ? "sizeof" : "count", zend_zval_type_name(op1));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17797,7 +17797,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COUNT_SPEC_TMPVAR_UNUSED_HANDL
|
||||||
ZVAL_UNDEFINED_OP1();
|
ZVAL_UNDEFINED_OP1();
|
||||||
}
|
}
|
||||||
count = 0;
|
count = 0;
|
||||||
zend_type_error("%s(): Argument #1 ($var) must be of type Countable|array, %s given", opline->extended_value ? "sizeof" : "count", zend_zval_type_name(op1));
|
zend_type_error("%s(): Argument #1 ($value) must be of type Countable|array, %s given", opline->extended_value ? "sizeof" : "count", zend_zval_type_name(op1));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47392,7 +47392,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COUNT_SPEC_CV_UNUSED_HANDLER(Z
|
||||||
ZVAL_UNDEFINED_OP1();
|
ZVAL_UNDEFINED_OP1();
|
||||||
}
|
}
|
||||||
count = 0;
|
count = 0;
|
||||||
zend_type_error("%s(): Argument #1 ($var) must be of type Countable|array, %s given", opline->extended_value ? "sizeof" : "count", zend_zval_type_name(op1));
|
zend_type_error("%s(): Argument #1 ($value) must be of type Countable|array, %s given", opline->extended_value ? "sizeof" : "count", zend_zval_type_name(op1));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,10 +47,9 @@ try {
|
||||||
|
|
||||||
?>
|
?>
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
count(): Argument #1 ($var) must be of type Countable|array, null given
|
count(): Argument #1 ($value) must be of type Countable|array, null given
|
||||||
count(): Argument #1 ($var) must be of type Countable|array, string given
|
count(): Argument #1 ($value) must be of type Countable|array, string given
|
||||||
count(): Argument #1 ($var) must be of type Countable|array, int given
|
count(): Argument #1 ($value) must be of type Countable|array, int given
|
||||||
count(): Argument #1 ($var) must be of type Countable|array, bool given
|
count(): Argument #1 ($value) must be of type Countable|array, bool given
|
||||||
count(): Argument #1 ($var) must be of type Countable|array, bool given
|
count(): Argument #1 ($value) must be of type Countable|array, bool given
|
||||||
count(): Argument #1 ($var) must be of type Countable|array, stdClass given
|
count(): Argument #1 ($value) must be of type Countable|array, stdClass given
|
||||||
|
|
||||||
|
|
|
@ -103,23 +103,23 @@ echo "Done";
|
||||||
*** Testing sizeof() : object functionality ***
|
*** Testing sizeof() : object functionality ***
|
||||||
--- Testing sizeof() with objects which doesn't implement Countable interface ---
|
--- Testing sizeof() with objects which doesn't implement Countable interface ---
|
||||||
-- Iteration 1 --
|
-- Iteration 1 --
|
||||||
Default Mode: sizeof(): Argument #1 ($var) must be of type Countable|array, test given
|
Default Mode: sizeof(): Argument #1 ($value) must be of type Countable|array, test given
|
||||||
COUNT_NORMAL Mode: sizeof(): Argument #1 ($value) must be of type Countable|array, test given
|
COUNT_NORMAL Mode: sizeof(): Argument #1 ($value) must be of type Countable|array, test given
|
||||||
COUNT_RECURSIVE Mode: sizeof(): Argument #1 ($value) must be of type Countable|array, test given
|
COUNT_RECURSIVE Mode: sizeof(): Argument #1 ($value) must be of type Countable|array, test given
|
||||||
-- Iteration 2 --
|
-- Iteration 2 --
|
||||||
Default Mode: sizeof(): Argument #1 ($var) must be of type Countable|array, test1 given
|
Default Mode: sizeof(): Argument #1 ($value) must be of type Countable|array, test1 given
|
||||||
COUNT_NORMAL Mode: sizeof(): Argument #1 ($value) must be of type Countable|array, test1 given
|
COUNT_NORMAL Mode: sizeof(): Argument #1 ($value) must be of type Countable|array, test1 given
|
||||||
COUNT_RECURSIVE Mode: sizeof(): Argument #1 ($value) must be of type Countable|array, test1 given
|
COUNT_RECURSIVE Mode: sizeof(): Argument #1 ($value) must be of type Countable|array, test1 given
|
||||||
-- Iteration 3 --
|
-- Iteration 3 --
|
||||||
Default Mode: sizeof(): Argument #1 ($var) must be of type Countable|array, test2 given
|
Default Mode: sizeof(): Argument #1 ($value) must be of type Countable|array, test2 given
|
||||||
COUNT_NORMAL Mode: sizeof(): Argument #1 ($value) must be of type Countable|array, test2 given
|
COUNT_NORMAL Mode: sizeof(): Argument #1 ($value) must be of type Countable|array, test2 given
|
||||||
COUNT_RECURSIVE Mode: sizeof(): Argument #1 ($value) must be of type Countable|array, test2 given
|
COUNT_RECURSIVE Mode: sizeof(): Argument #1 ($value) must be of type Countable|array, test2 given
|
||||||
-- Iteration 4 --
|
-- Iteration 4 --
|
||||||
Default Mode: sizeof(): Argument #1 ($var) must be of type Countable|array, child_test2 given
|
Default Mode: sizeof(): Argument #1 ($value) must be of type Countable|array, child_test2 given
|
||||||
COUNT_NORMAL Mode: sizeof(): Argument #1 ($value) must be of type Countable|array, child_test2 given
|
COUNT_NORMAL Mode: sizeof(): Argument #1 ($value) must be of type Countable|array, child_test2 given
|
||||||
COUNT_RECURSIVE Mode: sizeof(): Argument #1 ($value) must be of type Countable|array, child_test2 given
|
COUNT_RECURSIVE Mode: sizeof(): Argument #1 ($value) must be of type Countable|array, child_test2 given
|
||||||
-- Iteration 5 --
|
-- Iteration 5 --
|
||||||
Default Mode: sizeof(): Argument #1 ($var) must be of type Countable|array, concrete_class given
|
Default Mode: sizeof(): Argument #1 ($value) must be of type Countable|array, concrete_class given
|
||||||
COUNT_NORMAL Mode: sizeof(): Argument #1 ($value) must be of type Countable|array, concrete_class given
|
COUNT_NORMAL Mode: sizeof(): Argument #1 ($value) must be of type Countable|array, concrete_class given
|
||||||
COUNT_RECURSIVE Mode: sizeof(): Argument #1 ($value) must be of type Countable|array, concrete_class given
|
COUNT_RECURSIVE Mode: sizeof(): Argument #1 ($value) must be of type Countable|array, concrete_class given
|
||||||
Done
|
Done
|
||||||
|
|
|
@ -28,4 +28,4 @@ bool(true)
|
||||||
bool(true)
|
bool(true)
|
||||||
bool(false)
|
bool(false)
|
||||||
int(2)
|
int(2)
|
||||||
count(): Argument #1 ($var) must be of type Countable|array, null given
|
count(): Argument #1 ($value) must be of type Countable|array, null given
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue