Through the past twenty four hours I've had an upgraded version of 4.6.6 and 4.7.2 running and I cannot get rid of the following message in either of them:

warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/politic/public_html/includes/theme.inc on line 249.

warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/politic/public_html/includes/theme.inc on line 252.

It is related to php, the issue disappears if I run php 4.4.2 - but I really want to run get it to run on 5.0.4 or higher though. Thought 4.6 and 4.7 is supposed to not have these problems with php5. So am wondering what I've fubar'ed to get it like this.

Comments

calebgilbert’s picture

fresh installs of 4.7.2 that don't have this problem....am really stuck at how to fix though.

Political Physics

knugar’s picture

Started upgrading from 4.6.3 to 4.7.3 today and run into the same problem. Here are my conclusions after playing around for a while.

First of all, for a fresh install, the drupal/themes directory only contains these sub folders:

  • bluemarine
  • chameleon
  • engines
  • pushbutton

, and wiht a fresh theme direcory I cannot trigger the bug.

Adding a custom theme to the drupal/themes directory:

  • bluemarine
  • chameleon
  • engines
  • my_theme
  • pushbutton

Whoala, now the following warnings/errors appear:

  • warning: array_merge() [function.array-merge]: Argument #2 is not an array in /var/www/localhost/htdocs/nyfikenvital.org.new/drupal/includes/theme.inc on line 253.
  • warning: array_merge() [function.array-merge]: Argument #1 is not an array in /var/www/localhost/htdocs/nyfikenvital.org.new/drupal/includes/theme.inc on line 256.

This is a PHP-5 issue, see for example http://drupal.org/node/25891#comment-34072

In theme.inc I simpy changed the errournus line to:

  $settings = array_merge($defaults, (array)variable_get('theme_settings', array()));

Hope this solves your problems.

knugar’s picture

Tried to search for issues related to this but couldn't find any, therefore I submitted this bug report.

ansorg’s picture

great!

The (array) cast solves a similar issue for me in gmap.module

edmonkey’s picture

I only get the array errors when I add markers to a map. I've patched the theme.inc file with the above change, what do I need to change within gmap.module to avoid these errors?

cheers!
(ps. its a cool module!)