Title: [Plugin: Magic Fields] Php 5.4 Compatibility
Last modified: August 20, 2016

---

# [Plugin: Magic Fields] Php 5.4 Compatibility

 *  Resolved [Bryce Fisher-Fleig](https://wordpress.org/support/users/brycefisher/)
 * (@brycefisher)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-magic-fields-php-54-compatibility/)
 * On all admin pages, I get the following warning message:
 * `Warning: Creating default object from empty value in path\to\wordpress\wp-content\
   plugins\magic-fields\RCCWP_Menu.php on line 213`
 * I’m running PHP 5.4 on my windows development server (latest version of xampp).
   I only noticed this message once I upgraded to PHP 5.4. I’m willing to help debug
   this.
 * I saw a similar issue in the forums:
    [http://wordpress.org/support/topic/buddypress-activation-outputs-warning-creating-default-object-from-empty-value?replies=7](http://wordpress.org/support/topic/buddypress-activation-outputs-warning-creating-default-object-from-empty-value?replies=7)
 * When I looked at the line with the error however, I couldn’t see anything that
   obviously needed to be set to a new stdObject().
 * Thanks for your help!!
 * [http://wordpress.org/extend/plugins/magic-fields/](http://wordpress.org/extend/plugins/magic-fields/)

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

 *  [frizi](https://wordpress.org/support/users/frizi/)
 * (@frizi)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/plugin-magic-fields-php-54-compatibility/#post-3107998)
 * It’s a latest php 5.4 version thing. Add this line to Magic field’s RCCWP_Menu.
   php and the problem will be solved:
 * if( !is_object( $result ) ) { $result = new StdClass; }
 *  [Reaxion](https://wordpress.org/support/users/reaxion/)
 * (@reaxion)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/plugin-magic-fields-php-54-compatibility/#post-3107999)
 * I’m having this problem too… so I just paste the line right at the end of the
   RCCWP_Menu.php file? I did that with no affect.
 * Thanks!
 *  [Reaxion](https://wordpress.org/support/users/reaxion/)
 * (@reaxion)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/plugin-magic-fields-php-54-compatibility/#post-3108000)
 * Sorry! I figured it out! But to be exact for someone with the same question, 
   I pasted it on line 208 BEFORE the line in question (213)
 * Thanks again! I’m always fearing the day Magic Fields breaks… 8/
 *  [frizi](https://wordpress.org/support/users/frizi/)
 * (@frizi)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/plugin-magic-fields-php-54-compatibility/#post-3108001)
 * Sorry, I’ve forgot to mention that. Yes, it was the line with the last else{}
   that function just at the start to avoid missing initialization.
 *  [relish1227](https://wordpress.org/support/users/relish1227/)
 * (@relish1227)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/plugin-magic-fields-php-54-compatibility/#post-3108008)
 * This did fix it for me, although I am a little worried about changing plugin 
   code like this. I’m also a bit scared about when/if MF stops working.
 * I’ll post about this on the MF Google Groups — would be great if this could be
   fixed in the plugin.
 *  Plugin Author [hunk](https://wordpress.org/support/users/hunk/)
 * (@hunk)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/plugin-magic-fields-php-54-compatibility/#post-3108009)
 * thanks [https://github.com/hunk/Magic-Fields/commit/21cb4b1779c513bc218234ca1458387c02abbaae](https://github.com/hunk/Magic-Fields/commit/21cb4b1779c513bc218234ca1458387c02abbaae)
 *  [relish1227](https://wordpress.org/support/users/relish1227/)
 * (@relish1227)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/plugin-magic-fields-php-54-compatibility/#post-3108010)
 * Hunk to the rescue! Thanks again for all your work.
 *  [lissetteganoza](https://wordpress.org/support/users/lissetteganoza/)
 * (@lissetteganoza)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/plugin-magic-fields-php-54-compatibility/#post-3108021)
 * Hey! thanks! I just had a problem in production site !! an I was scary!! but 
   your tip works really well!
    thanks!!!

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

The topic ‘[Plugin: Magic Fields] Php 5.4 Compatibility’ is closed to new replies.

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

 * 8 replies
 * 6 participants
 * Last reply from: [lissetteganoza](https://wordpress.org/support/users/lissetteganoza/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/plugin-magic-fields-php-54-compatibility/#post-3108021)
 * Status: resolved