From: mario at erphesfurt dot de
Operating system: Debian GNU/Linux, glibc2.3
PHP version: 5CVS-2003-10-31 (dev)
PHP Bug Type: Arrays related
Bug description: (5.0.0b2) reversal of array_merge() fix for #25494

Description:
------------
see also:
[url]http://bugs.php.net/bug.php?id=25494[/url]

Hi,

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(
$my_array,
array(
"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
data.

mario



--
Edit bug report at [url]http://bugs.php.net/?id=26063&edit=1[/url]
--
Try a CVS snapshot (php4): [url]http://bugs.php.net/fix.php?id=26063&r=trysnapshot4[/url]
Try a CVS snapshot (php5): [url]http://bugs.php.net/fix.php?id=26063&r=trysnapshot5[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=26063&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=26063&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=26063&r=needtrace[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=26063&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=26063&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=26063&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=26063&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=26063&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=26063&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=26063&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=26063&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=26063&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=26063&r=gnused[/url]
Floating point limitations: [url]http://bugs.php.net/fix.php?id=26063&r=float[/url]