summaryrefslogtreecommitdiff
path: root/src/globals.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/globals.cpp')
-rw-r--r--src/globals.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/globals.cpp b/src/globals.cpp
index 6c7af86..8132ef3 100644
--- a/src/globals.cpp
+++ b/src/globals.cpp
@@ -39,6 +39,9 @@ Global Globals::operator[](const char *name)
// pointer to a zval
zval **varvalue;
+ // we need the TSRMLS variable
+ TSRMLS_FETCH();
+
// check if the variable already exists
if (zend_hash_find(&EG(symbol_table), name, strlen(name)+1, (void**)&varvalue) == FAILURE)
{
@@ -63,6 +66,9 @@ Global Globals::operator[](const std::string &name)
{
// pointer to a zval
zval **varvalue;
+
+ // we need the TSRMLS variable
+ TSRMLS_FETCH();
// check if the variable already exists
if (zend_hash_find(&EG(symbol_table), name.c_str(), name.size()+1, (void**)&varvalue) == FAILURE)