mirror of
https://github.com/php/php-src.git
synced 2024-09-29 05:46:06 +00:00
Merge branch 'PHP-7.0' into PHP-7.1
This commit is contained in:
commit
b87e399393
1
NEWS
1
NEWS
@ -7,6 +7,7 @@ PHP NEWS
|
||||
(Nikita)
|
||||
. Fixed bug #73998 (array_key_exists fails on arrays created by
|
||||
get_object_vars). (mhagstrand)
|
||||
. Fixed bug #73954 (NAN check fails on Alpine Linux with musl). (Andrea)
|
||||
|
||||
- GD:
|
||||
. Fixed bug #74031 (ReflectionFunction for imagepng is missing last two
|
||||
|
@ -75,7 +75,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
#elif defined(HAVE_FPCLASS)
|
||||
#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
|
||||
#else
|
||||
#define zend_isnan(a) 0
|
||||
#define zend_isnan(a) ((a) != (a))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
23
Zend/tests/bug73954.phpt
Normal file
23
Zend/tests/bug73954.phpt
Normal file
@ -0,0 +1,23 @@
|
||||
--TEST--
|
||||
Bug #73954 (NAN check fails on Alpine Linux with musl)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
var_dump(NAN);
|
||||
var_dump(is_nan(NAN));
|
||||
|
||||
function takes_int(int $int) {
|
||||
}
|
||||
|
||||
takes_int(NAN);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
float(NAN)
|
||||
bool(true)
|
||||
|
||||
Fatal error: Uncaught TypeError: Argument 1 passed to takes_int() must be of the type integer, float given, called in %s on line 9 and defined in %s:6
|
||||
Stack trace:
|
||||
#0 %s(9): takes_int(NAN)
|
||||
#1 {main}
|
||||
thrown in %s on line 6
|
@ -80,7 +80,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
#elif defined(HAVE_FPCLASS)
|
||||
#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
|
||||
#else
|
||||
#define zend_isnan(a) 0
|
||||
#define zend_isnan(a) ((a) != (a))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user