Skip to content
This repository was archived by the owner on Mar 29, 2024. It is now read-only.

Commit b586e70

Browse files
committed
Setting boolean props on StackFrame with valid type
1 parent 50d3083 commit b586e70

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/php_v8_stack_frame.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,10 @@ void php_v8_stack_frame_create_from_stack_frame(zval *return_value, v8::Local<v8
6262
}
6363

6464
/* v8::StackFrame::IsEval */
65-
zend_update_property_long(this_ce, return_value, ZEND_STRL("is_eval"), static_cast<zend_bool >(frame->IsEval()));
65+
zend_update_property_bool(this_ce, return_value, ZEND_STRL("is_eval"), static_cast<zend_bool >(frame->IsEval()));
6666

6767
/* v8::StackFrame::IsConstructor */
68-
zend_update_property_long(this_ce, return_value, ZEND_STRL("is_constructor"),
69-
static_cast<zend_bool >(frame->IsConstructor()));
68+
zend_update_property_bool(this_ce, return_value, ZEND_STRL("is_constructor"), static_cast<zend_bool >(frame->IsConstructor()));
7069
}
7170

7271
static PHP_METHOD(V8StackFrame, __construct) {

tests/V8Exception_GetStackTrace.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ V8\StackTrace->getFrames():
126126
["function_name":"V8\StackFrame":private]=>
127127
string(0) ""
128128
["is_eval":"V8\StackFrame":private]=>
129-
int(0)
129+
bool(false)
130130
["is_constructor":"V8\StackFrame":private]=>
131-
int(0)
131+
bool(false)
132132
}
133133
}
134134
V8\StackTrace->GetFrameCount(): int(1)

0 commit comments

Comments
 (0)