|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-09-19 14:38 UTC] jani@php.net
[2009-09-27 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 21:00:01 2025 UTC |
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.