[php-src] master: date: use new zend_object_copy() API

From: Date: Thu, 01 Oct 2026 11:44:49 +0000
Subject: [php-src] master: date: use new zend_object_copy() API
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-141830@lists.php.net to get a copy of this message
Author: Gina Peter Banyard (Girgias) Date: 2026-10-01T12:43:57+01:00 Commit: https://github.com/php/php-src/commit/2619933f64e5197e2a97e44bb829ad950d10e102 Raw diff: https://github.com/php/php-src/commit/2619933f64e5197e2a97e44bb829ad950d10e102.diff date: use new zend_object_copy() API Changed paths: M ext/date/time_duration.c Diff: diff --git a/ext/date/time_duration.c b/ext/date/time_duration.c index f84bee1fc72e..3cbfca85649a 100644 --- a/ext/date/time_duration.c +++ b/ext/date/time_duration.c @@ -142,8 +142,7 @@ ZEND_ATTRIBUTE_NODISCARD static zend_result create_duration(zval *target, zend_u if (DATEG(duration_cache)) { zend_object_release(DATEG(duration_cache)); } - GC_ADDREF(&obj->std); - DATEG(duration_cache) = &obj->std; + DATEG(duration_cache) = zend_object_copy(&obj->std); return SUCCESS; }

« previous php.cvs (#141830) next »