php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #2272 implode() glues string to one-element-arrays
Submitted: 1999-09-09 14:25 UTC Modified: 2000-08-23 19:10 UTC
From: skra0063 at rz dot uni-hildesheim dot de Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 3.0.12 OS: Solaris 5.7
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: skra0063 at rz dot uni-hildesheim dot de
New email:
PHP Version: OS:

 

 [1999-09-09 14:25 UTC] skra0063 at rz dot uni-hildesheim dot de
if you use the implode()-function on an array with only one element in it, the glue string is appended to the name of the only element, anyway. i could not think of any situation where this could be helpful since the glue string is not appended to the last element of a more-that-one-element-array, either.
i, for example, use it to build a mysql-query where the glue string is "or (row-name)="; of course, mysql reports an error if it encounters something like "...=" with nothing behind the "=".
sure, one can easily work around this with an if-construct, but i think it would make more sense if, in the case described, the glue string were not appeneded to the result.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-23 19:10 UTC] hholzgra@php.net
seems to be fixed in 3.0.16 and 4.0.1
 [2017-01-18 19:14 UTC] krakjoe@php.net
Automatic comment from SVN on behalf of krakjoe
Revision: http://svn.php.net/viewvc/?view=revision&revision=341683
Log: PR #2272 dns_get_record CAA documentation
 [2017-01-19 05:19 UTC] krakjoe@php.net
Automatic comment from SVN on behalf of krakjoe
Revision: http://svn.php.net/viewvc/?view=revision&revision=341688
Log: changelog for PR #2272
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 07 05:01:30 2024 UTC