WordPress.org

Ready to get started?Download WordPress

Forums

Add Local Avatar
Possible fix for broken avatar upload (1 post)

  1. mikaelhm
    Member
    Posted 2 years ago #

    Hi I use this plugin, but started to get the error;

    Upload Error: Upload directory doesn't exist.

    I can see there is a problem with the path, thus I took a look at the code for the plugin.

    In, avatars.php, line 153, there is a function, avatar_root().

    I dont get why it strips the end of the ABSPATH, so I changed (line 159):
    return substr(ABSPATH, 0, -strlen(strrchr(substr(ABSPATH, 0, -1), '/')) - 1);
    to
    return ABSPATH.

    And it seems to WORK!

    Can anyone else verify this fix?

    http://wordpress.org/extend/plugins/add-local-avatar/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic