From af530282f530580c1ed7bc184df0a727068275e1 Mon Sep 17 00:00:00 2001 From: Emiel Bruijntjes Date: Tue, 3 Nov 2015 12:53:08 +0100 Subject: Fix compiler errors when compiling for a multi-threading environment, fixes issue #226 --- zend/exception_handler.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) 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 &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 &hand */ Value set_error_handler(const std::function &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 &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)); -- cgit v1.2.3