From 2503e43188bb90432ece02df10b6ffc6f76ad408 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Wed, 5 Jan 2022 14:20:32 +0000 Subject: [PATCH] Fix memleak on PHP 8 --- timecop_php7.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/timecop_php7.c b/timecop_php7.c index d6d6f88..a1f5d27 100644 --- a/timecop_php7.c +++ b/timecop_php7.c @@ -1215,7 +1215,7 @@ zend_always_inline static int parse_travel_freeze_arguments(tc_timeval *ret, INT #if PHP_VERSION_ID >= 80000 ZEND_PARSE_PARAMETERS_START(1, 1); Z_PARAM_OBJ_OF_CLASS_OR_LONG(dt_obj, TIMECOP_G(ce_DateTimeInterface), timestamp); - ZEND_PARSE_PARAMETERS_END_EX(return 0;); + ZEND_PARSE_PARAMETERS_END_EX(return 1;); if (dt_obj) { get_timeval_from_datetime(ret, dt_obj, dt_obj->ce);