From: markgdesign at gmail dot com Operating system: Windows Vista Home PHP version: 5.2.11 PHP Bug Type: Reproducible crash Bug description: sprintf('%s',join('',array(false))); crashes
Description: ------------ An array with a false or null element, joined, then used in sprintf apparently causes PHP to crash. Actually, Apache cycles endlessly making the OS think it has crashed. This is the simplest expression I can create which causes the problem: sprintf('%s',join('',array(false))); Forcing the result of join into type string avoids the problem: sprintf('%s',(string) join('',array(false))); Reproduce code: --------------- sprintf('%s',join('',array(false))); Expected result: ---------------- I expected it to join all array elements (interpreting false and null values as empty strings) and pass it to sprintf. Actual result: -------------- Apache cycled without responding to the page request. The Windows OS interpreted this as a crash, although Apache did not actually stop working or need to be restarted. -- Edit bug report at http://bugs.php.net/?id=49597&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49597&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49597&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49597&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49597&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49597&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49597&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49597&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49597&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49597&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49597&r=support Expected behavior: http://bugs.php.net/fix.php?id=49597&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49597&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49597&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49597&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49597&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49597&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49597&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49597&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49597&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49597&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49597&r=mysqlcfg