WordPress.org

Ready to get started?Download WordPress

Forums

wpMandrill
Bug: array_replace() only defined in PHP 5.3 (4 posts)

  1. Dan Bernardic
    Member
    Posted 1 year ago #

    Hello,

    The plugin did not work on my server which likely has PHP 5.2 ( HostMonster hosting ) . As stated on http://php.net/manual/en/function.array-replace.php , array_replace() was introduced in PHP 5.3 . Since WP supports >=5.2.4 ( http://wordpress.org/about/requirements/ ), I suggest either changing the code to not use array_replace, or defining a fallback using if ( ! function_exists( 'array_replace' ) ) ...

    I used http://php.net/manual/en/function.array-replace.php#105280 to define fallback.

    Thank you for sharing your software!

  2. Dan Bernardic
    Member
    Posted 1 year ago #

    OK, I won't be lazy, and I will give you the exact error message:

    Fatal error: Call to undefined function array_replace() in /.../wp-content/plugins/wpmandrill/wpmandrill.php on line 1799

  3. BH_WP_Guru
    Member
    Posted 1 year ago #

    Not that it fixes the bug, but to get it to work on Hostmonster, I know with them you can change the PHP Config to use PHP 5.3 or 5.4 if you want.

  4. Dan Bernardic
    Member
    Posted 1 year ago #

    Oh ya?

    Good to know, thanks for the reply.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.