php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #55397
Patch bug55397.phpt revision 2011-08-14 16:37 UTC by laruence@php.net
revision 2011-08-14 16:09 UTC by laruence@php.net
Patch bug55397.diff revision 2011-08-14 16:37 UTC by laruence@php.net
revision 2011-08-14 16:37 UTC by laruence@php.net
revision 2011-08-14 16:36 UTC by laruence@php.net
revision 2011-08-14 16:09 UTC by laruence@php.net

Patch bug55397.diff for Date/time related Bug #55397

Patch version 2011-08-14 16:09 UTC

Return to Bug #55397 | Download this patch
This patch is obsolete

Obsoleted by patches:

Patch Revisions:

Developer: laruence@php.net

Index: trunk/ext/date/php_date.c
===================================================================
--- trunk/ext/date/php_date.c	(revision 314900)
+++ trunk/ext/date/php_date.c	(working copy)
@@ -2066,6 +2066,10 @@
 		instanceof_function(Z_OBJCE_P(d2), date_ce_date TSRMLS_CC)) {
 		php_date_obj *o1 = zend_object_store_get_object(d1 TSRMLS_CC);
 		php_date_obj *o2 = zend_object_store_get_object(d2 TSRMLS_CC);
+
+		if (!o1->time || !o2->time) {
+			return 1;
+		}
 		
 		if (!o1->time->sse_uptodate) {
 			timelib_update_ts(o1->time, o1->time->tz_info);
Index: branches/PHP_5_4/ext/date/php_date.c
===================================================================
--- branches/PHP_5_4/ext/date/php_date.c	(revision 314806)
+++ branches/PHP_5_4/ext/date/php_date.c	(working copy)
@@ -2066,7 +2066,11 @@
 		instanceof_function(Z_OBJCE_P(d2), date_ce_date TSRMLS_CC)) {
 		php_date_obj *o1 = zend_object_store_get_object(d1 TSRMLS_CC);
 		php_date_obj *o2 = zend_object_store_get_object(d2 TSRMLS_CC);
-		
+
+		if (!o1->time || !o2->time) {
+			return 1;
+		}
+
 		if (!o1->time->sse_uptodate) {
 			timelib_update_ts(o1->time, o1->time->tz_info);
 		}
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Thu Apr 24 02:02:10 2014 UTC