WordPress.org

Support

Support » Plugins and Hacks » Advanced Custom Fields » [Resolved] [Plugin: Advanced Custom Fields] Undefined Index line 500

[Resolved] [Plugin: Advanced Custom Fields] Undefined Index line 500

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

    Please fix it.

    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 ‘[Resolved] [Plugin: Advanced Custom Fields] Undefined Index line 500’ is closed to new replies.
Skip to toolbar