mirror of
https://github.com/php/php-src.git
synced 2024-11-30 05:13:56 +08:00
- Fix for bug #14544, bogus warning in pow()
#- I think I do not need to tell who screwed this up....
This commit is contained in:
parent
424679e9fb
commit
3709eb6ab2
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user