Support » Plugin: Advanced Custom Fields » [Plugin: Advanced Custom Fields] Undefined Index line 500

  • Resolved sickhippie

    (@sickhippie)


    After creating a new post type, when I go to create a new post of that type, I get a series of Undefined Index errors stemming from line 500 of acf.php.

    The fix is simple – change $post_type to $post->post_type.

    This is just an informative post for the dev since advancedcustomfields.com is currently down.

    http://wordpress.org/extend/plugins/advanced-custom-fields/

Viewing 2 replies - 1 through 2 (of 2 total)
  • You can also change it to $GLOBALS[‘post_type’].

    Please fix it.

    sickhippie

    (@sickhippie)

    It’s personal preference, of course – I prefer $post->post_type for readability, but I would also swap $GLOBALS[‘post_type’] at line 432 with $post->post_type as well. Since the global $post object is called at the beginning of the function (line 414), it just makes more sense to me to call the attribute of that object rather than pulling it from $GLOBALS. Regardless, undefined index errors aren’t major, but they do fill up the error logs a bit, which can cause actual problems to get lost in the shuffle.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Advanced Custom Fields] Undefined Index line 500’ is closed to new replies.