php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68388 proto string implode([string glue,] array pieces)
Submitted: 2014-11-10 08:36 UTC Modified: 2014-11-11 07:52 UTC
From: zxh312007 at gmail dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.4.34 OS: fedora 20
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: zxh312007 at gmail dot com
New email:
PHP Version: OS:

 

 [2014-11-10 08:36 UTC] zxh312007 at gmail dot com
Description:
------------
$ php -r "echo implode(array(1,2));"
PHP Warning:  implode() expects exactly 2 parameters, 1 given in Command line code on line 1
PHP Stack trace:
PHP   1. {main}() Command line code:0
PHP   2. implode() Command line code:1

Warning: implode() expects exactly 2 parameters, 1 given in Command line code on line 1

Call Stack:
    0.0001     252880   1. {main}() Command line code:0
    0.0002     254792   2. implode() Command line code:1

PHP Warning:  Wrong parameter count for implode() in Command line code on line 1
PHP Stack trace:
PHP   1. {main}() Command line code:0
PHP   2. implode() Command line code:1

Warning: Wrong parameter count for implode() in Command line code on line 1

Call Stack:
    0.0001     252880   1. {main}() Command line code:0
    0.0002     254792   2. implode() Command line code:1

Test script:
---------------
php -r "echo implode(array(1,2));"

Expected result:
----------------
12

Actual result:
--------------
$ php -r "echo implode(array(1,2));"
PHP Warning:  implode() expects exactly 2 parameters, 1 given in Command line code on line 1
PHP Stack trace:
PHP   1. {main}() Command line code:0
PHP   2. implode() Command line code:1

Warning: implode() expects exactly 2 parameters, 1 given in Command line code on line 1

Call Stack:
    0.0001     252880   1. {main}() Command line code:0
    0.0002     254792   2. implode() Command line code:1

PHP Warning:  Wrong parameter count for implode() in Command line code on line 1
PHP Stack trace:
PHP   1. {main}() Command line code:0
PHP   2. implode() Command line code:1

Warning: Wrong parameter count for implode() in Command line code on line 1

Call Stack:
    0.0001     252880   1. {main}() Command line code:0
    0.0002     254792   2. implode() Command line code:1

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-11-10 09:20 UTC] requinix@php.net
-Status: Open +Status: Feedback
 [2014-11-10 09:20 UTC] requinix@php.net
I see you're using Xdebug. What other Zend extensions are you using? Disable them all and try again.
 [2014-11-11 01:28 UTC] zxh312007 at gmail dot com
-Status: Feedback +Status: Open
 [2014-11-11 01:28 UTC] zxh312007 at gmail dot com
I was failed to find the problem until i saw your comment, because I was checked on the source code. now I found out that I used Taint, disable it will fix the problem.

Extension: Taint, 
taint.c#L2382 , 
Last Commit: bf4a8bb024f0318934c52ed72952f5a968163337

thx!
 [2014-11-11 07:52 UTC] aharvey@php.net
-Status: Open +Status: Not a bug
 [2014-11-11 07:52 UTC] aharvey@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php


 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 08:00:02 2026 UTC