WordPress.org

Support

Support » Plugins and Hacks » JSON API » [Resolved] Bug report: get_bloginfo('home') deprecated in attachment.php

[Resolved] Bug report: get_bloginfo('home') deprecated in attachment.php

  • 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 http://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’);

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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

    http://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.

    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 ‘[Resolved] Bug report: get_bloginfo('home') deprecated in attachment.php’ is closed to new replies.
Skip to toolbar