diff options
Diffstat (limited to 'main/php_variables.c')
| -rw-r--r-- | main/php_variables.c | 8 | 
1 files changed, 3 insertions, 5 deletions
diff --git a/main/php_variables.c b/main/php_variables.c index 20bee7e8d9..4202db5aa2 100644 --- a/main/php_variables.c +++ b/main/php_variables.c @@ -49,7 +49,7 @@ PHPAPI void php_register_variable_safe(char *var, char *strval, int str_len, zva  	assert(strval != NULL);  	/* Prepare value */ -	ZVAL_STR(&new_entry, STR_INIT(strval, str_len, 0)); +	ZVAL_NEW_STR(&new_entry, STR_INIT(strval, str_len, 0));  	php_register_variable_ex(var, &new_entry, track_vars_array TSRMLS_CC);  } @@ -609,11 +609,9 @@ static inline void php_register_server_variables(TSRMLS_D)  	/* store request init time */  	{  		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); +		ZVAL_DOUBLE(&request_time_float, sapi_get_request_time(TSRMLS_C));  		php_register_variable_ex("REQUEST_TIME_FLOAT", &request_time_float, &PG(http_globals)[TRACK_VARS_SERVER] TSRMLS_CC); -		Z_TYPE(request_time_long) = IS_LONG; -		Z_LVAL(request_time_long) = zend_dval_to_lval(Z_DVAL(request_time_float)); +		ZVAL_LONG(&request_time_long, zend_dval_to_lval(Z_DVAL(request_time_float)));  		php_register_variable_ex("REQUEST_TIME", &request_time_long, &PG(http_globals)[TRACK_VARS_SERVER] TSRMLS_CC);  	}  | 
