File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -51,14 +51,14 @@ extern "C" {
51
51
Php::Class<JS::Context> context (" JS\\ Context" );
52
52
53
53
// properties can be assigned
54
- context.method ( " assign " , &JS::Context::assign, {
54
+ context.method < &JS::Context::assign>( " assign " , {
55
55
Php::ByVal (" name" , Php::Type::String, true ),
56
56
Php::ByVal (" value" , Php::Type::Null, true ),
57
57
Php::ByVal (" attribute" , Php::Type::Numeric, false )
58
58
});
59
59
60
60
// add a method to execute some script
61
- context.method ( " evaluate " , &JS::Context::evaluate, {
61
+ context.method < &JS::Context::evaluate>( " evaluate " , {
62
62
Php::ByVal (" script" , Php::Type::String, true ),
63
63
Php::ByVal (" timeout" , Php::Type::Numeric, false )
64
64
});
Original file line number Diff line number Diff line change @@ -92,6 +92,10 @@ v8::Handle<v8::Value> value(const Php::Value &input)
92
92
case Php::Type::Callable: result = v8::FunctionTemplate::New (Isolate::get (), callback, Handle (input))->GetFunction (); break ;
93
93
case Php::Type::Array: result = Array (input); break ;
94
94
default :
95
+ // php 7 does not return the Bool type anymore, but rather True and False
96
+ // types, which would not compile with our legacy code, so we check if it
97
+ // is boolean here again, using a function that works identically for both
98
+ if (input.isBool ()) result = v8::Boolean::New (Isolate::get (), input);
95
99
break ;
96
100
}
97
101
}
You can’t perform that action at this time.
0 commit comments