WordPress.org

Support

Support » Themes and Templates » [Resolved] "Argument #2 is not an array in …" [main.php]

[Resolved] "Argument #2 is not an array in …" [main.php]

  • I recently changed the version of PHP used on my server from 4 to 5.2. As soon as the change was reflected, I started getting a list of errors both within WP Admin and on the blog page. Whether this is coincidence or not, I don’t know, but I did manage to fix it.

    By editing the “main.php” file of Mantra and going down to line 24 (indicated in the error message), I “told” it that the value was an array. In other words, change:

    $optionsMantra = array_merge($mantra_defaults, $optionsMantra);

    to

    $optionsMantra = array_merge($mantra_defaults, (array)$optionsMantra);

    Clicking “Save” still causes errors on the Dashboard screen until you refresh, but the blog was fixed immediately.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] "Argument #2 is not an array in …" [main.php]’ is closed to new replies.