summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zend/exception_handler.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/zend/exception_handler.cpp b/zend/exception_handler.cpp
index aa925f9..75faef9 100644
--- a/zend/exception_handler.cpp
+++ b/zend/exception_handler.cpp
@@ -21,6 +21,9 @@ namespace Php {
*/
Value set_exception_handler(const std::function<Value(Parameters &params)> &handler)
{
+ // we need the tsrm_ls variable
+ TSRMLS_FETCH();
+
// create a functor which wraps our callback
Function functor(handler);
@@ -48,6 +51,9 @@ Value set_exception_handler(const std::function<Value(Parameters &params)> &hand
*/
Value set_error_handler(const std::function<Value(Parameters &params)> &handler, Error error)
{
+ // we need the tsrm_ls variable
+ TSRMLS_FETCH();
+
// create the functor which wraps our callback
Function functor(handler);
@@ -76,6 +82,9 @@ Value set_error_handler(const std::function<Value(Parameters &params)> &handler,
*/
Value error_reporting(Error error)
{
+ // we need the tsrm_ls variable
+ TSRMLS_FETCH();
+
// store the old error reporting value
Value output(EG(error_reporting));