php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #26007 implode error
Submitted: 2003-10-27 13:04 UTC Modified: 2003-10-28 10:34 UTC
From: timothy dot wilson at lmco dot com Assigned:
Status: Wont fix Package: Feature/Change Request
PHP Version: 4.3.1 OS: unix
Private report: No CVE-ID: None
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
32 + 36 = ?
Subscribe to this entry?

 
 [2003-10-27 13:04 UTC] timothy dot wilson at lmco dot com
Description:
------------
My request is to have implode not blow up when not given an array.  This could be done by setting a standard for the variable order

implode(glue, pieces)

check pieces for is_array()...if so, then do your thing, if not then return pieces instead of an error.

Reproduce code:
---------------
$arr="blah";

$new_list = implode ("|", $arr);

echo $new_list;

Expected result:
----------------
blah

Actual result:
--------------
error:....

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-10-28 10:34 UTC] sniper@php.net
This will not be changed. Just think of the 'wtf factor'.
It's hard enough to find bugs in your scripts already given all the "lazy" features in PHP.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Sep 28 23:01:27 2024 UTC