This repository was archived by the owner on Mar 29, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ static void php_v8_value_free(zend_object *object) {
108
108
php_v8_value_t *php_v8_value = php_v8_value_fetch_object (object);
109
109
110
110
// TODO: check whether we have valid isolate?
111
- if (php_v8_value->php_v8_isolate && php_v8_value->persistent && !php_v8_value->persistent ->IsEmpty ()) {
111
+ if (PHP_V8_IS_UP_AND_RUNNING () && php_v8_value->php_v8_isolate && php_v8_value->persistent && !php_v8_value->persistent ->IsEmpty ()) {
112
112
PHP_V8_ENTER_STORED_ISOLATE (php_v8_value);
113
113
114
114
// TODO: in general, this makes sense only for objects
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Built-in enum classes
3
+ --SKIPIF--
4
+ <?php if (!extension_loaded ("v8 " )) {
5
+ print "skip " ;
6
+ } ?>
7
+ --FILE--
8
+ <?php
9
+
10
+ /** @var \Phpv8Testsuite $helper */
11
+ $ helper = require '.testsuite.php ' ;
12
+
13
+ $ enums = [
14
+ new V8 \StringValue (new V8 \Isolate ()),
15
+ ];
16
+
17
+ foreach ($ enums as $ enum ) {
18
+ $ rc = new ReflectionClass ($ enum );
19
+ }
20
+
21
+ echo 'done ' , PHP_EOL ;
22
+
23
+ ?>
24
+ --EXPECT--
25
+ done
You can’t perform that action at this time.
0 commit comments