php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch datetime-gc-issue for Date/time related Bug #49700

Patch version 2010-03-05 10:22 UTC

Return to Bug #49700 | Download this patch
Patch Revisions:

Developer: felipe@php.net

Index: ext/date/php_date.c
===================================================================
--- ext/date/php_date.c	(revisão 295834)
+++ ext/date/php_date.c	(cópia de trabalho)
@@ -2081,7 +2081,7 @@
 
 	props = dateobj->std.properties;
 
-	if (!dateobj->time) {
+	if (!dateobj->time || (props && GC_G(gc_active))) {
 		return props;
 	}
 
@@ -2224,7 +2224,7 @@
 
 	props = intervalobj->std.properties;
 
-	if (!intervalobj->initialized) {
+	if (!intervalobj->initialized || (props && GC_G(gc_active))) {
 		return props;
 	}
 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC