diff options
author | Martijn Otto <martijn.otto@copernica.com> | 2016-05-17 13:47:20 +0200 |
---|---|---|
committer | Martijn Otto <martijn.otto@copernica.com> | 2016-05-17 13:47:20 +0200 |
commit | dd5f3a635053aa03417cdab1228e03c94b9c3136 (patch) | |
tree | 53178a459fcefdfa551eb501064e70453611788a /zend/super.cpp | |
parent | 9f2e816c787c30ceeb139623c8dae594c4b4443d (diff) |
Fixed final compilation issues
Diffstat (limited to 'zend/super.cpp')
-rw-r--r-- | zend/super.cpp | 12 |
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]; } /** |