From e06b382bd0d2224dc21ebbb6f5a779e11e468f51 Mon Sep 17 00:00:00 2001 From: Marek Skopal Date: Wed, 8 Feb 2023 14:04:03 +0100 Subject: [PATCH] Fixed build on PHP 8.0.x --- v8js_object_export.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/v8js_object_export.cc b/v8js_object_export.cc index 967f6ac..2154d27 100644 --- a/v8js_object_export.cc +++ b/v8js_object_export.cc @@ -38,7 +38,11 @@ v8::Local v8js_propagate_exception(v8js_ctx *ctx) /* {{{ */ { v8::Local return_value = v8::Null(ctx->isolate); +#if PHP_VERSION_ID < 80100 + if (!(ctx->flags & V8JS_FLAG_PROPAGATE_PHP_EXCEPTIONS) || zend_is_unwind_exit(EG(exception))) { +#else if (!(ctx->flags & V8JS_FLAG_PROPAGATE_PHP_EXCEPTIONS) || zend_is_graceful_exit(EG(exception)) || zend_is_unwind_exit(EG(exception))) { +#endif v8js_terminate_execution(ctx->isolate); return return_value; }