]> granicus.if.org Git - php/commitdiff
Avoid warning about possible precision loss
authorDmitry Stogov <dmitry@zend.com>
Mon, 18 Feb 2013 09:27:42 +0000 (13:27 +0400)
committerDmitry Stogov <dmitry@zend.com>
Mon, 18 Feb 2013 09:27:42 +0000 (13:27 +0400)
ZendAccelerator.c

index 2fb87551aaf7d01886fd6b4090d02c0b1d1c52ca..79eb7f4a344571632344f43aa520f4f4b8794026 100644 (file)
@@ -1847,7 +1847,8 @@ static void accel_activate(void)
        }
 
        SHM_UNPROTECT();
-       ZCG(request_time) = sapi_get_request_time(TSRMLS_C);
+       /* PHP-5.4 and above return "double", but we use 1 sec precision */
+       ZCG(request_time) = (time_t)sapi_get_request_time(TSRMLS_C);
        ZCG(cache_opline) = NULL;
        ZCG(cache_persistent_script) = NULL;
        ZCG(include_path_check) = !ZCG(include_path_key);