Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Zend/zend_execute_API.c
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,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;
Expand Down