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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: timothy dot wilson at lmco dot com
New email:
PHP Version: OS:

 

 [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

Add a Patch

Pull Requests

Add a Pull Request

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: Wed Jun 26 14:01:32 2024 UTC