WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. IainPurdie
    Member
    Posted 1 year 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);

    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.

  2. IainPurdie
    Member
    Posted 1 year 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
    Member
    Posted 1 year ago #

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

  4. CryoutCreations
    Member
    Theme Author

    Posted 12 months 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