summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2015-11-03 12:53:08 +0100
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2015-11-03 12:53:08 +0100
commitaf530282f530580c1ed7bc184df0a727068275e1 (patch)
treed1cf7e1eb4768e154d0adbeeea66379bea41f1d2
parent3abb2828fd521b36f64eb32568823807430484bc (diff)
Fix compiler errors when compiling for a multi-threading environment, fixes issue #226
-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));