Skip to content

Commit

Permalink
Fix compiler errors when compiling for a multi-threading environment,…
Browse files Browse the repository at this point in the history
… fixes issue #226
  • Loading branch information
EmielBruijntjes committed Nov 3, 2015
1 parent 3abb282 commit af53028
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions zend/exception_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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));

Expand Down

0 comments on commit af53028

Please sign in to comment.