|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1998-05-04 18:47 UTC] zeev
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 01:00:01 2025 UTC |
implode() reliably segfaults when passed an empty array; the following patch fixes it (for me): 158c158 < /* convert everything to strings, and calculate length */ --- > /* check for empty array passed in */ 160c160,165 < while (hash_get_current_data(arr->value.ht, (void **) &tmp) == SUCCESS) { --- > if (hash_get_current_data(arr->value.ht, (void **) &tmp) != SUCCESS) { > return; > } > > /* convert everything to strings, and calculate length */ > do { 168c173,174 < } --- > } while (hash_get_current_data(arr->value.ht, (void **) &tmp) == SUCCESS); >