summaryrefslogtreecommitdiff
path: root/ext/sqlite/libsqlite/src
diff options
context:
space:
mode:
Diffstat (limited to 'ext/sqlite/libsqlite/src')
-rw-r--r--ext/sqlite/libsqlite/src/date.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/sqlite/libsqlite/src/date.c b/ext/sqlite/libsqlite/src/date.c
index d1d7ddb5f..28ef9d8f6 100644
--- a/ext/sqlite/libsqlite/src/date.c
+++ b/ext/sqlite/libsqlite/src/date.c
@@ -16,7 +16,7 @@
** sqliteRegisterDateTimeFunctions() found at the bottom of the file.
** All other code has file scope.
**
-** $Id: date.c,v 1.3.4.1.2.2 2006/12/01 20:24:58 fmk Exp $
+** $Id: date.c,v 1.3.4.1.2.3 2007/06/07 09:07:36 tony2001 Exp $
**
** NOTES:
**
@@ -420,6 +420,9 @@ static double localtimeOffset(DateTime *p){
t = (x.rJD-2440587.5)*86400.0 + 0.5;
sqliteOsEnterMutex();
pTm = php_localtime_r(&t, &tmbuf);
+ if (!pTm) {
+ return 0;
+ }
y.Y = pTm->tm_year + 1900;
y.M = pTm->tm_mon + 1;
y.D = pTm->tm_mday;