]> granicus.if.org Git - php/commitdiff
- Fix for bug #14544, bogus warning in pow()
authorDerick Rethans <derick@php.net>
Sun, 16 Dec 2001 10:59:20 +0000 (10:59 +0000)
committerDerick Rethans <derick@php.net>
Sun, 16 Dec 2001 10:59:20 +0000 (10:59 +0000)
#- I think I do not need to tell who screwed this up....

ext/standard/math.c

index 66a693a39deb42e6ed7b39dcd40c4c4c935f599c..484809982e1c8e40d4a9dce50749ad7dd8e336c2 100644 (file)
@@ -411,7 +411,7 @@ PHP_FUNCTION(pow)
                /* pow(?, float), this is the ^^ case */
                convert_to_double_ex(zbase);
 
-               if ( Z_DVAL_PP(zbase) <= 0.0 ) {
+               if (Z_DVAL_PP(zbase) < 0.0) {
                        /* Note that with the old behaviour, php pow() returned bogus
                           results. Try pow(-1, 2.5) in PHP <= 4.0.6 ... */
                        php_error(E_WARNING, "Trying to raise a nonpositive value to a broken power");