Skip to content

Commit 039945f

Browse files
committed
fixup! Deprecate calling get_class() and get_parent_class() without arguments
1 parent d42cda0 commit 039945f

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

Zend/zend_vm_def.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9331,8 +9331,8 @@ ZEND_VM_COLD_CONST_HANDLER(191, ZEND_GET_CLASS, UNUSED|CONST|TMPVAR|CV, UNUSED)
93319331
USE_OPLINE
93329332

93339333
if (OP1_TYPE == IS_UNUSED) {
9334+
SAVE_OPLINE();
93349335
if (UNEXPECTED(!EX(func)->common.scope)) {
9335-
SAVE_OPLINE();
93369336
zend_throw_error(NULL, "get_class() without arguments must be called from within a class");
93379337
ZVAL_UNDEF(EX_VAR(opline->result.var));
93389338
HANDLE_EXCEPTION();
@@ -9341,8 +9341,9 @@ ZEND_VM_COLD_CONST_HANDLER(191, ZEND_GET_CLASS, UNUSED|CONST|TMPVAR|CV, UNUSED)
93419341
ZVAL_STR_COPY(EX_VAR(opline->result.var), EX(func)->common.scope->name);
93429342
if (UNEXPECTED(EG(exception))) {
93439343
HANDLE_EXCEPTION();
9344+
} else {
9345+
ZEND_VM_NEXT_OPCODE();
93449346
}
9345-
ZEND_VM_NEXT_OPCODE();
93469347
}
93479348
} else {
93489349
zval *op1;

Zend/zend_vm_execute.h

Lines changed: 12 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)