mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2: Fix lineno in function redeclaration error
This commit is contained in:
commit
381e020edb
5 changed files with 24 additions and 3 deletions
|
@ -175,13 +175,13 @@ failure:
|
|||
function2 = Z_PTR_P(t);
|
||||
CG(in_compilation) = 1;
|
||||
zend_set_compiled_filename(function1->op_array.filename);
|
||||
CG(zend_lineno) = function1->op_array.opcodes[0].lineno;
|
||||
CG(zend_lineno) = function1->op_array.line_start;
|
||||
if (function2->type == ZEND_USER_FUNCTION
|
||||
&& function2->op_array.last > 0) {
|
||||
zend_error(E_ERROR, "Cannot redeclare %s() (previously declared in %s:%d)",
|
||||
ZSTR_VAL(function1->common.function_name),
|
||||
ZSTR_VAL(function2->op_array.filename),
|
||||
(int)function2->op_array.opcodes[0].lineno);
|
||||
(int)function2->op_array.line_start);
|
||||
} else {
|
||||
zend_error(E_ERROR, "Cannot redeclare %s()", ZSTR_VAL(function1->common.function_name));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue