From 4a5536a03341e51d4ad39c9d4b3182cf7e889629 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Sat, 29 Mar 2008 22:02:20 +0000 Subject: [PATCH] - Fixed bug #44533 (floatval() issues E_NOTICE "non well formed numeric value") (Keep the old behavior, as other related functions) --- ext/standard/type.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ext/standard/type.c b/ext/standard/type.c index b565848d74..19ca9d03be 100644 --- a/ext/standard/type.c +++ b/ext/standard/type.c @@ -179,13 +179,14 @@ PHP_FUNCTION(intval) Get the float value of a variable */ PHP_FUNCTION(floatval) { - double retval; + zval **num; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &retval) == FAILURE) { - return; + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) { + WRONG_PARAM_COUNT; } - RETURN_DOUBLE(retval); + RETVAL_ZVAL(*num, 1, 0); + convert_to_double(return_value); } /* }}} */ -- 2.40.0