mirror of
https://github.com/php/php-src.git
synced 2025-08-21 01:45:16 +02:00
Set filename & lineno information for preload inheritance error
This commit is contained in:
parent
92fae00ee0
commit
1b31b45f6f
2 changed files with 9 additions and 2 deletions
|
@ -3335,7 +3335,14 @@ static void preload_link(void)
|
||||||
zv = zend_hash_set_bucket_key(EG(class_table), (Bucket*)zv, key);
|
zv = zend_hash_set_bucket_key(EG(class_table), (Bucket*)zv, key);
|
||||||
zend_string_release(key);
|
zend_string_release(key);
|
||||||
if (EXPECTED(zv)) {
|
if (EXPECTED(zv)) {
|
||||||
|
/* Set filename & lineno information for inheritance errors */
|
||||||
|
CG(in_compilation) = 1;
|
||||||
|
CG(compiled_filename) = ce->info.user.filename;
|
||||||
|
CG(zend_lineno) = ce->info.user.line_start;
|
||||||
zend_do_link_class(ce, parent);
|
zend_do_link_class(ce, parent);
|
||||||
|
CG(in_compilation) = 0;
|
||||||
|
CG(compiled_filename) = NULL;
|
||||||
|
|
||||||
changed = 1;
|
changed = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,5 +11,5 @@ opcache.preload={PWD}/preload_inheritance_error_ind.inc
|
||||||
<?php
|
<?php
|
||||||
echo "Foobar\n";
|
echo "Foobar\n";
|
||||||
?>
|
?>
|
||||||
--EXPECT--
|
--EXPECTF--
|
||||||
Fatal error: Declaration of B::foo($bar) must be compatible with A::foo() in Unknown on line 0
|
Fatal error: Declaration of B::foo($bar) must be compatible with A::foo() in %spreload_inheritance_error.inc on line 7
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue