ID:               41836
 Updated by:       [EMAIL PROTECTED]
 Reported By:      lubbers_corrado at yahoo dot com
-Status:           Open
+Status:           Bogus
-Bug Type:         Arrays related
+Bug Type:         Unknown/Other Function
 Operating System: Windows XP SP2
 PHP Version:      5.2.3
 New Comment:

array_pad() does not change already existing values and your array
contains empty string.


Previous Comments:
------------------------------------------------------------------------

[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] [EMAIL PROTECTED]

Cannot reproduce.

------------------------------------------------------------------------

[2007-06-28 08:13:26] lubbers_corrado at yahoo dot com

Description:
------------
When trying to fill an _empty_ array by using array_pad with negative
direction, the last element will be padded but stays empty

When the source Array has at least one element, this error does not
occur

Reproduce code:
---------------
$foo = array();
$foo = array_pad($foo,-2,"bar");
echo print_r($foo,true);


Expected result:
----------------
Array ( [0] => bar [1] => bar );

Actual result:
--------------
Array ( [0] => bar [1] => );


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=41836&edit=1

Reply via email to