mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
Merge branch 'PHP-8.2'
* PHP-8.2: Fallback to first line of function when ex->opline is NULL (#10003)
This commit is contained in:
commit
6109b80926
@ -638,6 +638,10 @@ ZEND_API uint32_t zend_get_executed_lineno(void) /* {{{ */
|
||||
ex = ex->prev_execute_data;
|
||||
}
|
||||
if (ex) {
|
||||
if (!ex->opline) {
|
||||
/* Missing SAVE_OPLINE()? Falling back to first line of function */
|
||||
return ex->func->op_array.opcodes[0].lineno;
|
||||
}
|
||||
if (EG(exception) && ex->opline->opcode == ZEND_HANDLE_EXCEPTION &&
|
||||
ex->opline->lineno == 0 && EG(opline_before_exception)) {
|
||||
return EG(opline_before_exception)->lineno;
|
||||
|
Loading…
Reference in New Issue
Block a user