From f1f0deae4cbfa8006536481359f52dd308e15d95 Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Thu, 7 Jun 2007 09:07:12 +0000 Subject: php_localtime_r() checks --- ext/pdo_sqlite/sqlite/src/date.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ext/pdo_sqlite/sqlite') diff --git a/ext/pdo_sqlite/sqlite/src/date.c b/ext/pdo_sqlite/sqlite/src/date.c index 68d17a7013..10633e9afe 100644 --- a/ext/pdo_sqlite/sqlite/src/date.c +++ b/ext/pdo_sqlite/sqlite/src/date.c @@ -415,8 +415,10 @@ static double localtimeOffset(DateTime *p){ computeJD(&x); t = (x.rJD-2440587.5)*86400.0 + 0.5; sqlite3OsEnterMutex(); - pTm = php_localtime_r -(&t, &tmbuf); + 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; -- cgit v1.2.1