diff options
author | Patrick Allaert <patrickallaert@php.net> | 2012-01-06 13:37:51 +0000 |
---|---|---|
committer | Patrick Allaert <patrickallaert@php.net> | 2012-01-06 13:37:51 +0000 |
commit | a4305214a3803b5e4d1ae82c9c0bbb05f0e8ef3a (patch) | |
tree | 9f99d665f30d378bcb3e77a952672c5be1feb3a0 /main/php_variables.c | |
parent | 0a67d26633c73471b506d2642d4b19baa9b53c8a (diff) | |
download | php-git-a4305214a3803b5e4d1ae82c9c0bbb05f0e8ef3a.tar.gz |
Changed: restoring REQUEST_TIME as a long, introducing REQUEST_TIME_FLOAT instead as discussed on the ML
Diffstat (limited to 'main/php_variables.c')
-rw-r--r-- | main/php_variables.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/main/php_variables.c b/main/php_variables.c index 1ab7ad0259..5f779f991c 100644 --- a/main/php_variables.c +++ b/main/php_variables.c @@ -581,10 +581,13 @@ static inline void php_register_server_variables(TSRMLS_D) } /* store request init time */ { - zval new_entry; - Z_TYPE(new_entry) = IS_DOUBLE; - Z_DVAL(new_entry) = sapi_get_request_time(TSRMLS_C); - php_register_variable_ex("REQUEST_TIME", &new_entry, array_ptr TSRMLS_CC); + zval request_time_float, request_time_long; + Z_TYPE(request_time_float) = IS_DOUBLE; + Z_DVAL(request_time_float) = sapi_get_request_time(TSRMLS_C); + php_register_variable_ex("REQUEST_TIME_FLOAT", &request_time_float, array_ptr TSRMLS_CC); + Z_TYPE(request_time_long) = IS_LONG; + Z_LVAL(request_time_long) = zend_dval_to_lval(Z_DVAL(request_time_float)); + php_register_variable_ex("REQUEST_TIME", &request_time_long, array_ptr TSRMLS_CC); } } |