felipe          Sat Mar 29 22:02:20 2008 UTC

  Modified files:              
    /php-src/ext/standard       type.c 
  Log:
  - Fixed bug #44533 (floatval() issues E_NOTICE "non well formed numeric 
value")
  (Keep the old behavior, as other related functions)
  
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/type.c?r1=1.54&r2=1.55&diff_format=u
Index: php-src/ext/standard/type.c
diff -u php-src/ext/standard/type.c:1.54 php-src/ext/standard/type.c:1.55
--- php-src/ext/standard/type.c:1.54    Sat Feb  2 13:11:12 2008
+++ php-src/ext/standard/type.c Sat Mar 29 22:02:20 2008
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: type.c,v 1.54 2008/02/02 13:11:12 helly Exp $ */
+/* $Id: type.c,v 1.55 2008/03/29 22:02:20 felipe Exp $ */
 
 #include "php.h"
 #include "php_incomplete_class.h"
@@ -179,13 +179,14 @@
    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);
 }
 /* }}} */
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to