WordPress.org

Support

Support » Plugins and Hacks » User Photo throwing some debug errors

User Photo throwing some debug errors

  • Hi guys, got the latest version of User Photo running on 3.5.1 and I also have debug turned on. Debug is throwing the following errors for User Photo which you may or may not know.

    Notice: load_plugin_textdomain was called with an argument that is deprecated since version 2.7 with no alternative available. in /var/www/edgemagazine.net/wp-includes/functions.php on line 2925 Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in /var/www/edgemagazine.net/wp-includes/functions.php on line 2923

    http://wordpress.org/extend/plugins/user-photo/

Viewing 5 replies - 1 through 5 (of 5 total)
  • I just wanted to pitch in that I get the exact same two errors.

    • load_plugin_textdomain called with a deprecated argument
    • has_cap called with a deprecated argument.

    I am also using 3.5.1 with WP_DEBUG turned on.

    A solution can be found here : http://wordpress.org/support/topic/plugin-user-photo-current-version-causing-notices-warnings-fixed?replies=8

    You’ll need to re-apply these changes every time you update the plugin until the authors of this plugin fixes this.

    Thank you nddery, that thread you linked to contained fixes for the errors I was seeing. It seems as if the fixes are not very difficult, but the plugin just hasn’t been updated in a while.

    If one is using version 0.9.5.2 of user-photo, then patching it is not so difficult. Here is the reader’s digest version.

    1. Change this line:

    load_plugin_textdomain('user-photo', PLUGINDIR . '/user-photo/localization');

    …to this:

    load_plugin_textdomain('user-photo', false, dirname( plugin_basename( __FILE__ ) ) . '/localization/');

    2. Change this line:

    add_options_page('User Photo', 'User Photo', 8, __FILE__, 'userphoto_options_page');

    …to this:

    add_options_page('User Photo', 'User Photo', 'add_users', __FILE__, 'userphoto_options_page');

    Patching the plugin will only work as long as you don’t update the plugin. More information and ideas can be found in the thread that nddery linked to above.

    Uri @ initech
    Member

    @urievencheninitechcoil

    I got the same 2 notices and implemented your patch and the notices were fixed. Plugin authors, please fix these notices.

    AngieP
    Participant

    @angiep

    Will this patch also stop the plugin from deactivating periodically?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘User Photo throwing some debug errors’ is closed to new replies.