Argument #1 is not an array on line 615.
chastytilayne - May 8, 2009 - 16:42
| Project: | Node Images |
| Version: | 6.x-2.1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
i got this in drupal 6, using php5.
warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/infoshared/modules/node_images/node_images.module on line 615.
php5 manual says :
The behavior of array_merge() was modified in PHP 5. Unlike PHP 4, array_merge() now only accepts parameters of type array. However, you can use typecasting to merge other types. See the example below for details.
Example #1 array_merge() PHP 5 example
<?php
$beginning = 'foo';
$end = array(1 => 'bar');
$result = array_merge((array)$beginning, (array)$end);
print_r($result);
?>so line 615 putting array typecasting in arg 1:
$cache->data['node_images']['wrapper'] = array_merge( (array) $cache->data['node_images']['wrapper'], $form);
seems to fix things..

#1
Was this ever confirmed as a bug? I'm seeing the same behaviour but only intermittently.
#2
I also experienced this bug (but it stated on line 613).
Just some additional info, this bug only happens when uploading the image (on the Node images" section) while entering the text and it has not been saved yet.
But if we have saved the node and then upload the images by clicking the Images tab, this bug won't show.
Thank you.