zoe             Tue Feb 12 07:27:49 2008 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/standard/tests/math    exp_error.phpt 
    /php-src/ext/standard       math.c 
  Log:
  Fixing 44092
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/math/exp_error.phpt?r1=1.1.4.2&r2=1.1.4.3&diff_format=u
Index: php-src/ext/standard/tests/math/exp_error.phpt
diff -u php-src/ext/standard/tests/math/exp_error.phpt:1.1.4.2 
php-src/ext/standard/tests/math/exp_error.phpt:1.1.4.3
--- php-src/ext/standard/tests/math/exp_error.phpt:1.1.4.2      Wed Feb  6 
09:51:19 2008
+++ php-src/ext/standard/tests/math/exp_error.phpt      Tue Feb 12 07:27:49 2008
@@ -9,6 +9,6 @@
 ?>
 --EXPECTF--
 
-Warning: Wrong parameter count for exp() in %s on line 2
+Warning: exp() expects exactly 1 parameter, 0 given in %s on line %d
 
-Warning: Wrong parameter count for exp() in %s on line 3
+Warning: exp() expects exactly 1 parameter, 2 given in %s on line %d
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/math.c?r1=1.131.2.2.2.7&r2=1.131.2.2.2.8&diff_format=u
Index: php-src/ext/standard/math.c
diff -u php-src/ext/standard/math.c:1.131.2.2.2.7 
php-src/ext/standard/math.c:1.131.2.2.2.8
--- php-src/ext/standard/math.c:1.131.2.2.2.7   Mon Dec 31 07:20:13 2007
+++ php-src/ext/standard/math.c Tue Feb 12 07:27:49 2008
@@ -19,7 +19,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: math.c,v 1.131.2.2.2.7 2007/12/31 07:20:13 sebastian Exp $ */
+/* $Id: math.c,v 1.131.2.2.2.8 2008/02/12 07:27:49 zoe Exp $ */
 
 #include "php.h"
 #include "php_math.h"
@@ -471,14 +471,14 @@
    Returns e raised to the power of the number */
 PHP_FUNCTION(exp)
 {
-       zval **num;
+        double num;
+
+        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &num) == 
FAILURE) {
+                return;
+        }
+
+        RETURN_DOUBLE(exp(num));
 
-       if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) 
{
-               WRONG_PARAM_COUNT;
-       }
-       convert_to_double_ex(num);
-       Z_DVAL_P(return_value) = exp(Z_DVAL_PP(num));
-       Z_TYPE_P(return_value) = IS_DOUBLE;
 }
 /* }}} */
 

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

Reply via email to