summaryrefslogtreecommitdiff
path: root/ext/xmlrpc
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2007-06-07 09:07:36 +0000
committerAntony Dovgal <tony2001@php.net>2007-06-07 09:07:36 +0000
commit074b58b7f1ed52850c96f603e318e6496b82442e (patch)
tree24c1a5aaa1b5a3b3aa3275b5bc3347a1ef5a9a27 /ext/xmlrpc
parentd042fd067569aac8970428629309d9b1110bbbcc (diff)
downloadphp-git-074b58b7f1ed52850c96f603e318e6496b82442e.tar.gz
MFH: php_localtime_r() checks
Diffstat (limited to 'ext/xmlrpc')
-rw-r--r--ext/xmlrpc/libxmlrpc/xmlrpc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/xmlrpc/libxmlrpc/xmlrpc.c b/ext/xmlrpc/libxmlrpc/xmlrpc.c
index 2a5600290b..d263ab6878 100644
--- a/ext/xmlrpc/libxmlrpc/xmlrpc.c
+++ b/ext/xmlrpc/libxmlrpc/xmlrpc.c
@@ -43,6 +43,9 @@ static const char rcsid[] = "#(@) $Id$";
* 9/1999 - 10/2000
* HISTORY
* $Log$
+ * Revision 1.8.4.1 2006/11/30 16:38:37 iliaa
+ * last set of zts fixes
+ *
* Revision 1.8 2005/03/28 00:07:24 edink
* Reshufle includes to make it compile on windows
*
@@ -233,6 +236,9 @@ static int date_from_ISO8601 (const char *text, time_t * value) {
static int date_to_ISO8601 (time_t value, char *buf, int length) {
struct tm *tm, tmbuf;
tm = php_localtime_r(&value, &tmbuf);
+ if (!tm) {
+ return 0;
+ }
#if 0 /* TODO: soap seems to favor this method. xmlrpc the latter. */
return strftime (buf, length, "%Y-%m-%dT%H:%M:%SZ", tm);
#else