diff --git a/v8js_convert.cc b/v8js_convert.cc index b736705..f00de3c 100644 --- a/v8js_convert.cc +++ b/v8js_convert.cc @@ -744,11 +744,6 @@ static inline v8::Local php_v8js_named_property_callback(v8::Local php_v8js_named_property_callback(v8::Local zval_to_v8js(zval *value, v8::Isolate *isolate TSRMLS_DC) if (instanceof_function(Z_OBJCE_P(value), ce TSRMLS_CC)) { zval *dtval; zend_call_method_with_0_params(&value, NULL, NULL, "getTimestamp", &dtval); - if (dtval) + if (dtval) { jsValue = V8JS_DATE(((double)Z_LVAL_P(dtval) * 1000.0)); + zval_ptr_dtor(&dtval); + } else jsValue = V8JS_NULL; } else