@@ -543,7 +543,7 @@ static void v8js_fake_call_impl(const v8::FunctionCallbackInfo<v8::Value>& info)
543
543
if (!info[1 ]->IsArray ()) {
544
544
error_len = spprintf (&error, 0 ,
545
545
" %s::__call expects 2nd parameter to be an array" ,
546
- ce->name );
546
+ ZSTR_VAL ( ce->name ) );
547
547
548
548
if (error_len > std::numeric_limits<int >::max ()) {
549
549
zend_throw_exception (php_ce_v8js_exception,
@@ -607,14 +607,14 @@ static void v8js_fake_call_impl(const v8::FunctionCallbackInfo<v8::Value>& info)
607
607
// okay, look up the method name and manually invoke it.
608
608
const zend_object_handlers *h = object->handlers ;
609
609
zend_function *method_ptr = h->get_method (&object, method_name, NULL );
610
- zend_string_release (method_name);
611
610
612
611
if (method_ptr == NULL ||
613
612
(method_ptr->common .fn_flags & ZEND_ACC_PUBLIC) == 0 ||
614
613
(method_ptr->common .fn_flags & (ZEND_ACC_CTOR|ZEND_ACC_DTOR)) != 0 ) {
615
614
error_len = spprintf (&error, 0 ,
616
615
" %s::__call to %s method %s" , ZSTR_VAL (ce->name ),
617
- (method_ptr == NULL ) ? " undefined" : " non-public" , method_name);
616
+ (method_ptr == NULL ) ? " undefined" : " non-public" , ZSTR_VAL (method_name));
617
+ zend_string_release (method_name);
618
618
619
619
if (error_len > std::numeric_limits<int >::max ()) {
620
620
zend_throw_exception (php_ce_v8js_exception,
@@ -629,6 +629,8 @@ static void v8js_fake_call_impl(const v8::FunctionCallbackInfo<v8::Value>& info)
629
629
return ;
630
630
}
631
631
632
+ zend_string_release (method_name);
633
+
632
634
v8::Local<v8::FunctionTemplate> tmpl =
633
635
v8::Local<v8::FunctionTemplate>::New
634
636
(isolate, *reinterpret_cast <v8js_function_tmpl_t *>(self->GetAlignedPointerFromInternalField (0 )));
0 commit comments