|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26063 (5.0.0b2) reversal of array_merge() fix for #25494
Submitted: 2003-10-31 15:29 UTC Modified: 2003-10-31 16:52 UTC
From: mario at erphesfurt dot de Assigned:
Status: Not a bug Package: Arrays related
PHP Version: 5CVS-2003-10-31 (dev) OS: Debian GNU/Linux, glibc2.3
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: mario at erphesfurt dot de
New email:
PHP Version: OS:


 [2003-10-31 15:29 UTC] mario at erphesfurt dot de
see also:


The array_merge() fix introduced into beta2 broke my scripts, 'cause they
relied upon array_merge() to return something even if some of the passed
parameters were undef.

I used to merge values into my arrays that way, even if it was unclear
wether there was previously data in it:

$my_array = array_merge(
      "fill_up" => "if_unset",
      "this" => "too",

Which now doesn't work any longer. - this requires some code bloat to
work around now (introducing a user-level array_merge).

I don't believe the current ext/standard/array.c:php_array_merge_wrapper
addresses the problem described in #25494, it now just fails and sends
eventual paramaters of PHP:ewiki_merge() to hell, making it incompatible
to previous versions (PHP4,beta1).

Why wasn't just a warning message sufficient?!

If you guys really like to change the way that PHP function was used, then
you could replace E_WARNING with E_ERROR inside the array.c on line 2222 -
this would be less bogus than a _warning_ message that silently kills



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-10-31 16:52 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

As with all other functions in PHP, when invalid parameters are passed E_WARNING is generated. E_ERROR is intended for unrecoverable errors, such as parse errors.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Oct 20 09:03:33 2021 UTC