WordPress.org

Ready to get started?Download WordPress

Forums

JSON API
[resolved] json_encode issue on PHP (4 posts)

  1. krider2010
    Member
    Posted 1 year ago #

    Hi,

    The recent new version broke on PHP installs before 5.3...

    <br />
    <b>Warning</b>:  json_encode() expects exactly 1 parameter, 2 given in <b>.../wp-content/plugins/json-api/singletons/response.php</b> on line <b>40</b><br />

    (Which when it's supposed to be returning a JSON response rather than HTML causes some interesting issues :) )

    I was able to fix it short term by editing the plugin and removing the second parameter, but I expect others to come across this, and also don't want to have to make the fix each time the plugin is updated.

    Cheers!

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

  2. dphiffer
    Member
    Plugin Author

    Posted 1 year ago #

    Hi krider2010, thanks for the bug report. This is fixed in version 1.1.0.

    The next release will suppress PHP warnings so that the JSON output doesn't get messed up when, for example, WP_DEBUG is enabled.

  3. krider2010
    Member
    Posted 1 year ago #

    Brilliant - thank you! Fantastic response time :)

  4. wanula
    Member
    Posted 8 months ago #


Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic