cvs: php4 /ext/standard datetime.c

From: Date: Sat, 21 Sep 2002 15:41:20 +0000
Subject: cvs: php4 /ext/standard datetime.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-14140@lists.php.net to get a copy of this message
iliaa Sat Sep 21 11:41:20 2002 EDT Modified files: /php4/ext/standard datetime.c Log: Fixed bug #12934 locatime() now returns an error message when passed a negative value. Index: php4/ext/standard/datetime.c diff -u php4/ext/standard/datetime.c:1.94 php4/ext/standard/datetime.c:1.95 --- php4/ext/standard/datetime.c:1.94 Thu Sep 19 14:22:51 2002 +++ php4/ext/standard/datetime.c Sat Sep 21 11:41:20 2002 @@ -19,7 +19,7 @@ */ -/* $Id: datetime.c,v 1.94 2002/09/19 18:22:51 iliaa Exp $ */ +/* $Id: datetime.c,v 1.95 2002/09/21 15:41:20 iliaa Exp $ */ #include "php.h" @@ -646,7 +646,7 @@ assoc_array = Z_LVAL_PP(assoc_array_arg); break; } - if (NULL == (ta = php_localtime_r(&timestamp, &tmbuf))) { + if (timestamp < 0 || NULL == (ta = php_localtime_r(&timestamp, &tmbuf))) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid local time"); RETURN_FALSE; }

« previous php.cvs (#14140) next »