Bug #17654: array_merge() throws warning when supplied with 1 argument only
| From: | carlos at wfmh dot org dot pl | Date: | Sat, 08 Jun 2002 12:16:39 +0000 |
| Subject: | Bug #17654: array_merge() throws warning when supplied with 1 argument only | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-9839@lists.php.net to get a copy of this message | ||
From: carlos@wfmh.org.pl
Operating system: Linux GNU/Debian
PHP version: 4.2.1
PHP Bug Type: Arrays related
Bug description: array_merge() throws warning when supplied with 1 argument only
array_merge() throws an "Wrong parameter count" if called with only 1
argument given. I consider it a bug, as there's no technical reason it
should act that way. One can say merging one array makes no sense, which
is correct from logical point of view, but from the ther side, technical,
there's nothing that I can imagine to prevent array_merge() to handle
this case w/o any error. Currently if I write a code that utilises
array_merge() and I plan it to scale later on, I can 't simply write
$res = array_merge( $arr1 );
and expand the lists later on, if I get more arrays.
--
Edit bug report at http://bugs.php.net/?id=17654&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=17654&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=17654&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=17654&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=17654&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17654&r=support
Expected behavior: http://bugs.php.net/fix.php?id=17654&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=17654&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=17654&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=17654&r=globals