Support » Theme: Mantra » "Argument #2 is not an array in …" [main.php]

  • Resolved IainPurdie

    (@iainpurdie)


    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)
  • P.S. Posted this as I had to re-do the “fix” after the recent update (obviously) over-write my edited main.php file.

    IainPurdie

    (@iainpurdie)

    Just updated to 1.9.9.6 and, with overwriting my main.php, the fault re-occurred. Seriously, has nobody else had this problem?

    Theme Author CryoutCreations

    (@cryout-creations)

    This has been a very elusive issue, but it was eventually solved in 2.0.2

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