Title: [Plugin: wpMandrill] Bug: array_replace() only defined in PHP 5.3
Last modified: August 20, 2016

---

# [Plugin: wpMandrill] Bug: array_replace() only defined in PHP 5.3

 *  [Dan Bernardic](https://wordpress.org/support/users/dbernar1/)
 * (@dbernar1)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-wpmandrill-bug-array_replace-only-defined-in-php-53/)
 * 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](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/](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](http://php.net/manual/en/function.array-replace.php#105280)
   to define fallback.
 * Thank you for sharing your software!

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [Dan Bernardic](https://wordpress.org/support/users/dbernar1/)
 * (@dbernar1)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-wpmandrill-bug-array_replace-only-defined-in-php-53/#post-3073064)
 * 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
 *  [BH_WP_Guru](https://wordpress.org/support/users/bh_wp_guru/)
 * (@bh_wp_guru)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-wpmandrill-bug-array_replace-only-defined-in-php-53/#post-3073103)
 * 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.
 *  Thread Starter [Dan Bernardic](https://wordpress.org/support/users/dbernar1/)
 * (@dbernar1)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-wpmandrill-bug-array_replace-only-defined-in-php-53/#post-3073172)
 * Oh ya?
 * Good to know, thanks for the reply.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘[Plugin: wpMandrill] Bug: array_replace() only defined in PHP 5.3’ is
closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wpmandrill_171717.svg)
 * [wpMandrill](https://wordpress.org/plugins/wpmandrill/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpmandrill/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpmandrill/)
 * [Active Topics](https://wordpress.org/support/plugin/wpmandrill/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpmandrill/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpmandrill/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Dan Bernardic](https://wordpress.org/support/users/dbernar1/)
 * Last activity: [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-wpmandrill-bug-array_replace-only-defined-in-php-53/#post-3073172)
 * Status: not resolved