• Resolved flacoman91

    (@flacoman91)


    Hi,

    Thanks for making this plugin.
    When wp_debug is set to true in wp-config.php the following error is thrown on a basic json call https://mysite.local/?json=1

    The php warning is:

    Notice: get_bloginfo was called with an argument that is deprecated since version 2.2! The home option is deprecated for the family of bloginfo() functions. Use the url option instead.

    The error occurs in
    json-api/models/attachment.php

    line 44:
    $home = get_bloginfo(‘home’);

    should be changed to

    $home = get_bloginfo(‘url’);

    https://www.ads-software.com/extend/plugins/json-api/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter flacoman91

    (@flacoman91)

    Another warning appears on the json api config page:

    Notice: Undefined index: url in /Users/flacoman91/Sites/wordpress/wp-content/plugins/json-api/singletons/api.php on line 175

    https://harmony.sonymusic.local/wp-admin/options-general.php?page=json-api

    just a simple check if url is a valid index fixes the error:

    if ( isset($info[‘url’]) ) {

    I am having the same issue. And even though the json is returning after the notice about get_bloginfo, it is causing my ajax request to fail.

    Error:

    Notice: get_bloginfo was called with an argument that is deprecated since version 2.2! The home option is deprecated for the family of bloginfo() functions. Use the url option instead. in C:\—\wp-includes\functions.php on line <i>2923

    Setting define(‘WP_DEBUG’, false); in wp-config.php fixes the issue but in development I obviously need error reporting on.

    Thread Starter flacoman91

    (@flacoman91)

    MrCollins, If you fix the errors in each of the 2 posts I had above, the plugin should run without any errors.

    Plugin Author dphiffer

    (@dphiffer)

    Thanks for the bug reports. These will be fixed in the next point release.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Bug report: get_bloginfo('home') deprecated in attachment.php’ is closed to new replies.