Skip to content

Instantly share code, notes, and snippets.

@m6w6
Created January 22, 2015 10:10
Show Gist options
  • Save m6w6/03a7dba84573d80b80c4 to your computer and use it in GitHub Desktop.
Save m6w6/03a7dba84573d80b80c4 to your computer and use it in GitHub Desktop.
reading original declared properties returns indirect zvals
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index 0173251..d6d6a9f 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -713,6 +713,9 @@ try_again:
case IS_REFERENCE:
op = Z_REFVAL_P(op);
goto try_again;
+ case IS_INDIRECT:
+ op = Z_INDIRECT_P(op);
+ goto try_again;
EMPTY_SWITCH_DEFAULT_CASE()
}
return 0;
@@ -754,6 +757,9 @@ try_again:
case IS_REFERENCE:
op = Z_REFVAL_P(op);
goto try_again;
+ case IS_INDIRECT:
+ op = Z_INDIRECT_P(op);
+ goto try_again;
EMPTY_SWITCH_DEFAULT_CASE()
}
return 0.0;
@@ -807,6 +813,9 @@ try_again:
case IS_REFERENCE:
op = Z_REFVAL_P(op);
goto try_again;
+ case IS_INDIRECT:
+ op = Z_INDIRECT_P(op);
+ goto try_again;
case IS_STRING:
return zend_string_copy(Z_STR_P(op));
EMPTY_SWITCH_DEFAULT_CASE()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment