[resolved] "Argument #2 is not an array in ..." [main.php] (4 posts)

  1. IainPurdie
    Posted 3 years ago #

    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);


    $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.

  2. IainPurdie
    Posted 3 years ago #

    P.S. Posted this as I had to re-do the "fix" after the recent update (obviously) over-write my edited main.php file.

  3. IainPurdie
    Posted 3 years ago #

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

  4. CryoutCreations
    Theme Author

    Posted 3 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic