WordPress.org

Ready to get started?Download WordPress

Forums

All In One Favicon
[resolved] Error after updating to ver 4.2 (4 posts)

  1. lifechange
    Member
    Posted 1 year ago #

    Hi,

    I just updated to the latest version (4.2 I think) of your plugin. I have got WP 3.5 running.

    I now get the following error messages in the backend:

    Warning: _() expects exactly 1 parameter, 2 given in /home/.sites/128/site1470/web/wp-content/plugins/all-in-one-favicon/all-in-one-favicon.php on line 101

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

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

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

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

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

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

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

    In the former version, I got no problems.

    Can you give me a helping hand on this?

    Thanks a lot in advance.

    Greetz, Hannes

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

  2. 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 (changing each _ to _e would also work, but I thought adding another _ looked easier to the eye when checking over the code in the future), which fixes the problem and will stop displaying the warnings :)

  3. 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

  4. lifechange
    Member
    Posted 1 year ago #

    Hi Arne, hi Nathaniel,

    thanks a lot for your fast help. Now everything works fine. :-)

    Topic can be closed.

    Greetz, Hannes

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic