Support » Plugin: WP User Avatar » Error thrown Cannot use string offset as an array

  • Resolved d4mation

    (@d4mation)


    Running PHP 7.2, WP 5.0

    When this plugin is active, the following message is shown on the website. No further stack trace is shown, nor is anything shown in the Error Log about it. I had to reactivate plugins one-by-one to find this issue after migrating the site.

    From what I have been able to find via Google Searching, this is a PHP 7.2 error message.

    Error thrown
    Cannot use string offset as an array

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • I get the same error: WP User Avatar error: array_key_exists() expects parameter 2 to be array

    Warning: array_key_exists() expects parameter 2 to be array, 
    string given in 
    /home/www/subdomain.domain.come/wp-content/plugins/wp-user-avatar/includes
    /class-wp-user-avatar-functions.php on line 140
    
    Fatal error: Uncaught Error: Cannot use string offset as an array in 
    /home/www/subdomain.domain.come/wp-content/plugins/wp-user-avatar
    /includes/class-wp-user-avatar-functions.php:150 
    Stack trace: #0 /home/www/subdomain.domain.come/wp-content/plugins
    /wp-user-avatar/includes/class-wp-user-avatar-functions.php(356):
    WP_User_Avatar_Functions->wpua_has_gravatar(1) 
    #1 /home/www/subdomain.domain.come/wp-includes/class-wp-hook.php(288): 
    WP_User_Avatar_Functions->wpua_get_avatar_filter
    ('<img alt='' src...', 1, 64, 'wp_user_avatar', 'Avatar') #2 
    /home/www/subdomain.domain.come/wp-includes/plugin.php(208): 
    WP_Hook->apply_filters('<img alt='' src...', Array) 
    #3 /home/www/subdomain.domain.come/wp-includes/pluggable.php(2658):   
    apply_filters('get_avatar', 
    '<img alt='' src...', 1, 64, 'wp_user_avatar', '', Array) 
    #4 /home/www/subdomain.domain.come/wp-includes/admin-bar.php 
    (279): get_avatar(1, 64) 
    #5 /home/www/subdomain.domain.come/wp-includes/class-wp-hook.php(286): 
    wp_admin_bar_my_account_menu(Object(WP_Admi in 
    /home/www/subdomain.domain.come/wp-content/plugins/wp-user-avatar
    /includes/class-wp-user-avatar-functions.php on line 150

    I never had a plugin with this kind of behaviour. The only to get back control over WordPress is to start FileZilla and to rename path wp-content/plugins/wp-user-avatar to different name.

    Plugin Author Flipper Code

    (@flippercode)

    Hello,

    Sorry for the inconvenience you had. We’re checking this issue on high priority today and updating you.

    Thanks

    Plugin Author Flipper Code

    (@flippercode)

    Hello,

    We have released the new version. can you please update and let me know if still, you’re having the same issue.

    Thanks

    Due to above error, I have deinstalled plugin yesterday and was surprised to read about very quick fix. Now I have installed wp-user-avatar again and test is fine. Error message did not appear again. Thanks a lot!

    I could have sworn I turned on email notifications for this, but I must have missed it in my inbox.

    I updated the plugin to v2.2.0 and reactivated and the error went away and the site stayed accessible. Thank you so much for the fast response!

    I had the same problem.

    When i try update my wordpress to 5.1.1, its crash and show:

    “Error thrown
    Cannot use string offset as an array”

    And I copy old files in directory and its back to back to work.

    I waiting anything with same error. My template is Metropoles 1.1.8.

    Anybody can help me?

    My name is Daniel, and i from Brazil.

    My problem its not fixed….

    I using the wordpress 5.0.3 with the template Metropolis.

    The template is legal, i buy in the site. But, when i upgrade its crash and show the error:

    “WordPress 5.0.3 com o tema Metropolis.

    “Error thrown
    Cannot use string offset as an array”

    I waiting by 2 months, without update the wordpress.

    Please anything help-me!!! 🙂

    I can locate two errors:
    1) nextgen-gallery plugin say the error,
    2) the second error is the metropolis template.

    Thanks a Lots!!!!!

    Error i found in Metropolis 1.1.8 Responsive template, i Will fix it!!!!

    “Warning: Declaration of Quick_Count_List_Table::prepare_items($start_timestamp, $end_timestamp) should be compatible with WP_List_Table::prepare_items() in /home/admin/domains/mysite.com.br/public_html/wp-content/plugins/quick-count/class-quick-count-list-table.php on line 6

    Warning: Illegal string offset ‘menu’ in /home/admin/domains/mysite.com.br/public_html/wp-content/themes/mynewtemplate/config/config.php on line 11

    Notice: Array to string conversion in /home/admin/domains/mysite.com.br/public_html/wp-content/themes/mynewtemplate/config/config.php on line 11

    Warning: Illegal string offset ‘post_types’ in /home/admin/domains/mysite.comt.br/public_html/wp-content/themes/mynewtemplate/config/config.php on line 23

    Notice: Array to string conversion in /home/admin/domains/mysite.com.br/public_html/wp-content/themes/mynewtemplate/config/config.php on line 23

    Warning: Illegal string offset ‘post_formats’ in /home/admin/domains/mysite.com.br/public_html/wp-content/themes/mynewtemplate/config/config.php on line 34

    Notice: Array to string conversion in /home/admin/domains/mysite.com.br/public_html/wp-content/themes/mynewtemplate/config/config.php on line 34

    Warning: Illegal string offset ‘taxonomies’ in /home/admin/domains/mysite.com.br/public_html/wp-content/themes/mynewtemplate/config/config.php on line 39

    Notice: Array to string conversion in /home/admin/domains/mysite.com.br/public_html/wp-content/themes/mynewtemplate/config/config.php on line 39

    Warning: Illegal string offset ‘wp_menus’ in /home/admin/domains/mysite.com.br/public_html/wp-content/themes/mynewtemplate/config/config.php on line 46

    Notice: Array to string conversion in /home/admin/domains/mysite.com.br/public_html/wp-content/themes/mynewtemplate/config/config.php on line 46

    Warning: Illegal string offset ‘sidebar_template’ in /home/admin/domains/mysite.com.br/public_html/wp-content/themes/mynewtemplate/config/config.php on line 55

    Notice: Array to string conversion in /home/admin/domains/mysite.com.br/public_html/wp-content/themes/mynewtemplate/config/config.php on line 55

    Warning: Illegal string offset ‘sidebars’ in /home/admin/domains/mysite.com.br/public_html/wp-content/themes/mynewtemplate/config/config.php on line 65

    Notice: Array to string conversion in /home/admin/domains/mysite.com.br/public_html/wp-content/themes/mynewtemplate/config/config.php on line 65

    Warning: Illegal string offset ‘system_sidebars’ in /home/admin/domains/mysite.com.br/public_html/wp-content/themes/mynewtemplate/config/config.php on line 77

    Notice: Array to string conversion in /home/admin/domains/mysite.com.br/public_html/wp-content/themes/mynewtemplate/config/config.php on line 77

    Warning: Illegal string offset ‘system_sidebars’ in /home/admin/domains/mysite.com.br/public_html/wp-content/themes/mynewtemplate/config/config.php on line 83

    Fatal error: Uncaught Error: Cannot use string offset as an array in /home/admin/domains/mysite.com.br/public_html/wp-content/themes/mynewtemplate/config/config.php:83 Stack trace: #0 /home/admin/domains/mysite.com.br/public_html/wp-content/themes/mynewtemplate/config/thb_functions.php(36): require_once() #1 /home/admin/domains/mysite.com.br/public_html/wp-content/themes/mynewtemplate/functions.php(8): require_once(‘/home/admin/dom…’) #2 /home/admin/domains/mysite.com.br/public_html/wp-settings.php(499): include(‘/home/admin/dom…’) #3 /home/admin/domains/mysite.com.br/public_html/wp-config.php(99): require_once(‘/home/admin/dom…’) #4 /home/admin/domains/mysite.com.br/public_html/wp-load.php(37): require_once(‘/home/admin/dom…’) #5 /home/admin/domains/mysite.com.br/public_html/wp-blog-header.php(13): require_once(‘/home/admin/dom…’) #6 /home/admin/domains/mysite.com.br/public_html/index.php(17): require(‘/home/admin/dom…’) #7 {main} thrown in /home/admin/domains/mysite.com.br/public_html/wp-content/themes/mynewtemplate/config/config.php on line 83”

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    @dcesarribeiro, Please create a new thread to discuss your own issues: https://wordpress.org/support/plugin/wp-user-avatar/#new-post

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Error thrown Cannot use string offset as an array’ is closed to new replies.