diff --git a/ext/standard/math.c b/ext/standard/math.c index 9ee15dbc7be..accddaa0bbe 100644 --- a/ext/standard/math.c +++ b/ext/standard/math.c @@ -691,7 +691,7 @@ PHP_FUNCTION(log) RETURN_FALSE; } if (base == 1) { - RETURN_DOUBLE(NAN); + RETURN_DOUBLE(php_get_nan()); } else { RETURN_DOUBLE(log(num) / log(base)); }