WordPress.org

Forums

JSON API
PHP warnings when create post (1 post)

  1. aurepons
    Member
    Posted 1 year ago #

    When creating a new post with Posts Conroller, some warnings are shown when php errors are enabled.

    I have discovered this is because global $post variable is not defined when you call setup_postdata at import_wp_object function of post model object (./models/post.php about line 134)

    If you add next code before this line, problem is solved, but maybe you can find more elegant solution.

    global $post; $post=$wp_post;

    Thank you

    http://wordpress.org/plugins/json-api/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • JSON API
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic