Skip to content

Commit 2215966

Browse files
committed
Fix GCC 12 warning
1 parent ad1d050 commit 2215966

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

scalar_objects.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,7 @@ static zval *get_object_zval_ptr_real(
8282
int type
8383
) {
8484
if (op_type == IS_UNUSED) {
85-
if (!SO_THIS) {
86-
zend_error(E_ERROR, "Using $this when not in object context");
87-
}
88-
85+
ZEND_ASSERT(SO_THIS && "Checked by get_object_zval_ptr_safe() beforehand");
8986
return SO_THIS;
9087
} else {
9188
return get_zval_ptr_real(opline, op_type, node, execute_data, type);

0 commit comments

Comments
 (0)