Support » Plugin: JSON API » PHP warnings when create post

  • 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

  • The topic ‘PHP warnings when create post’ is closed to new replies.