summaryrefslogtreecommitdiff
path: root/zend/super.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'zend/super.cpp')
-rw-r--r--zend/super.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/zend/super.cpp b/zend/super.cpp
index ea690fe..02a1e46 100644
--- a/zend/super.cpp
+++ b/zend/super.cpp
@@ -32,10 +32,16 @@ Value Super::value()
TSRMLS_FETCH();
// call zend_is_auto_global to ensure that the just-in-time globals are loaded
- if (_name) { zend_is_auto_global(_name, ::strlen(_name) TSRMLS_CC); _name = nullptr; }
-
+ if (_name) {
+ // make the variable an auto global
+ zend_is_auto_global(zend_string_init(_name, ::strlen(_name), 1) TSRMLS_CC);
+
+ // reset because we only need to do this once
+ _name = nullptr;
+ }
+
// create a value object that wraps around the actual zval
- return Value(PG(http_globals)[_index]);
+ return &PG(http_globals)[_index];
}
/**