#41836 [Bgs]: array_pad does not fill last element when using negative pad and empty source
| From: | lubbers_corrado at yahoo dot com | Date: | Thu, 28 Jun 2007 08:54:14 +0000 |
| Subject: | #41836 [Bgs]: array_pad does not fill last element when using negative pad and empty source | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-114391@lists.php.net to get a copy of this message | ||
ID: 41836
User updated by: lubbers_corrado at yahoo dot com
Reported By: lubbers_corrado at yahoo dot com
Status: Bogus
Bug Type: Unknown/Other Function
Operating System: Windows XP SP2
PHP Version: 5.2.3
New Comment:
ok, thats it. Logical mistake by myself. Thank you for the fast reply!
Previous Comments:
------------------------------------------------------------------------
[2007-06-28 08:50:17] tony2001@php.net
array_pad() does not change already existing values and your array
contains empty string.
------------------------------------------------------------------------
[2007-06-28 08:49:19] lubbers_corrado at yahoo dot com
changed category to "arrays related"
------------------------------------------------------------------------
[2007-06-28 08:41:13] lubbers_corrado at yahoo dot com
Ok, i can reproduce again. it only happens when generating an array by
splitting an empty string. Check the example again, please
$foo = explode('*',"");
$foo = array_pad($foo,-2,"bar");
echo print_r($foo,true);
------------------------------------------------------------------------
[2007-06-28 08:38:51] lubbers_corrado at yahoo dot com
i also cannot reproduce again...strange happenings on my system i
assume .
------------------------------------------------------------------------
[2007-06-28 08:28:11] tony2001@php.net
Cannot reproduce.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/41836
--
Edit this bug report at http://bugs.php.net/?id=41836&edit=1