ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-Dev
php-Dev
#26063 [Opn->Bgs]: (5.0.0b2) reversal of array_merge() fix for #25494
by other posts by this author
Oct 31 2003 9:52PM messages near this date
#26063 [Com]: (5.0.0b2) reversal of array_merge() fix for #25494 | #26061 [NEW]: mail function chops html code when is used with php ver 4.3.3
ID:               26063
 Updated by:       iliaa@[...].net
 Reported By:      mario at erphesfurt dot de
-Status:           Open
+Status:           Bogus
 Bug Type:         Arrays related
 Operating System: Debian GNU/Linux, glibc2.3
 PHP Version:      5CVS-2003-10-31 (dev)
 New Comment:

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

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.


Previous Comments:
------------------------------------------------------------------------

[2003-10-31 15:29:23] mario at erphesfurt dot de

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

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 this bug report at http://bugs.php.net/?id=26063&edit=1
Thread:
mario at erphesfurt dot de
mario-adds-a-notice at erphesfurt dot de


Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved