WordPress.org

Ready to get started?Download WordPress

Forums

All In One Favicon
[resolved] 4.2 "Warning: _() expects exactly 1 parameter, 2 given" (11 posts)

  1. hauman
    Member
    Posted 1 year ago #

    Upgrading to 4.2 generates the following errors on admin pages:

    Warning: _() expects exactly 1 parameter, 2 given in /home/comicmix/public_html/wp-content/plugins/all-in-one-favicon/all-in-one-favicon.php on line 101
    
    Warning: _() expects exactly 1 parameter, 2 given in /home/comicmix/public_html/wp-content/plugins/all-in-one-favicon/all-in-one-favicon.php on line 102
    
    Warning: _() expects exactly 1 parameter, 2 given in /home/comicmix/public_html/wp-content/plugins/all-in-one-favicon/all-in-one-favicon.php on line 103
    
    Warning: _() expects exactly 1 parameter, 2 given in /home/comicmix/public_html/wp-content/plugins/all-in-one-favicon/all-in-one-favicon.php on line 104
    
    Warning: _() expects exactly 1 parameter, 2 given in /home/comicmix/public_html/wp-content/plugins/all-in-one-favicon/all-in-one-favicon.php on line 109
    
    Warning: _() expects exactly 1 parameter, 2 given in /home/comicmix/public_html/wp-content/plugins/all-in-one-favicon/all-in-one-favicon.php on line 110
    
    Warning: _() expects exactly 1 parameter, 2 given in /home/comicmix/public_html/wp-content/plugins/all-in-one-favicon/all-in-one-favicon.php on line 111
    
    Warning: _() expects exactly 1 parameter, 2 given in /home/comicmix/public_html/wp-content/plugins/all-in-one-favicon/all-in-one-favicon.php on line 112

    Favicons still display properly on site. Deactivating and reactivating does not fix the problem.

    http://wordpress.org/extend/plugins/all-in-one-favicon/

  2. jonodbn
    Member
    Posted 1 year ago #

    Yes, I will second that, i get the same error

  3. walkeezy
    Member
    Posted 1 year ago #

    Same here.

  4. Jade Bryan Jardinico
    Member
    Posted 1 year ago #

    These are my errors: Warning: _() expects exactly 1 parameter, 2 given in /home/gadjade/public_html/wp-content/plugins/all-in-one-favicon/all-in-one-favicon.php on line 101

    Warning: _() expects exactly 1 parameter, 2 given in /home/gadjade/public_html/wp-content/plugins/all-in-one-favicon/all-in-one-favicon.php on line 102

    Warning: _() expects exactly 1 parameter, 2 given in /home/gadjade/public_html/wp-content/plugins/all-in-one-favicon/all-in-one-favicon.php on line 103

    Warning: _() expects exactly 1 parameter, 2 given in /home/gadjade/public_html/wp-content/plugins/all-in-one-favicon/all-in-one-favicon.php on line 104

    Warning: _() expects exactly 1 parameter, 2 given in /home/gadjade/public_html/wp-content/plugins/all-in-one-favicon/all-in-one-favicon.php on line 109

    Warning: _() expects exactly 1 parameter, 2 given in /home/gadjade/public_html/wp-content/plugins/all-in-one-favicon/all-in-one-favicon.php on line 110

    Warning: _() expects exactly 1 parameter, 2 given in /home/gadjade/public_html/wp-content/plugins/all-in-one-favicon/all-in-one-favicon.php on line 111

    Warning: _() expects exactly 1 parameter, 2 given in /home/gadjade/public_html/wp-content/plugins/all-in-one-favicon/all-in-one-favicon.php on line 112

    Warning: Cannot modify header information - headers already sent by (output started at /home/gadjade/public_html/wp-content/plugins/all-in-one-favicon/all-in-one-favicon.php:101) in /home/gadjade/public_html/wp-content/plugins/wordpress-mobile-pack-bak/plugins/wpmp_switcher/wpmp_switcher.php on line 506

    I really don't know the problem. This occurs after updating.

  5. Anotherraven
    Member
    Posted 1 year ago #

    Me too, exactly same issue as #hauman..

  6. Nathaniel Bailey
    Member
    Posted 1 year ago #

    I just update my all in one fav icon plugin too and had the same warnings, but its a simple fix and just a little mistake in the coding of that file.

    Simply head to the file in the warning and change the following lines of code from:

    'frontendICO' => _('ICO',AIOFAVICON_TEXTDOMAIN),
            'frontendGIF' => _('GIF',AIOFAVICON_TEXTDOMAIN),
            'frontendPNG' => _('PNG',AIOFAVICON_TEXTDOMAIN),
            'frontendApple' => _('Apple Touch Icon',AIOFAVICON_TEXTDOMAIN)
          );
    
          //mapping of favicon types to translatable Strings
          $this->aioFaviconBackendMap = array(
            'backendICO' => _('ICO',AIOFAVICON_TEXTDOMAIN),
            'backendGIF' => _('GIF',AIOFAVICON_TEXTDOMAIN),
            'backendPNG' => _('PNG',AIOFAVICON_TEXTDOMAIN),
            'backendApple' => _('Apple Touch Icon',AIOFAVICON_TEXTDOMAIN)

    Change to:

    'frontendICO' => __('ICO',AIOFAVICON_TEXTDOMAIN),
            'frontendGIF' => __('GIF',AIOFAVICON_TEXTDOMAIN),
            'frontendPNG' => __('PNG',AIOFAVICON_TEXTDOMAIN),
            'frontendApple' => __('Apple Touch Icon',AIOFAVICON_TEXTDOMAIN)
          );
    
          //mapping of favicon types to translatable Strings
          $this->aioFaviconBackendMap = array(
            'backendICO' => __('ICO',AIOFAVICON_TEXTDOMAIN),
            'backendGIF' => __('GIF',AIOFAVICON_TEXTDOMAIN),
            'backendPNG' => __('PNG',AIOFAVICON_TEXTDOMAIN),
            'backendApple' => __('Apple Touch Icon',AIOFAVICON_TEXTDOMAIN)

    All that I have done is added an extra _ to each line, which fixes the problem and will stop displaying the warnings :)

  7. techotronic
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    I just released 4.2.1 where this is fixed.
    Weird, I didn't have any errormessages on my WordPress installation...

    Cheers,
    Arne

  8. Rob Knowlan
    Member
    Posted 1 year ago #

    Yes, 4.2.1 fixed that for me. Thanks, Arne!

  9. Rob Knowlan
    Member
    Posted 1 year ago #

    I was only seeing those messages on the admin side. The sites were fine.

  10. crackedjar
    Member
    Posted 1 year ago #

    I was having the same problem, but it is fixed now. :)

  11. jonodbn
    Member
    Posted 1 year ago #

    Dear Techotronic

    Thank you for the fix, it is working perfectly

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic