WordPress.org

Ready to get started?Download WordPress

Forums

Email Encoder Bundle - Protect Email Address
[resolved] error _() expects 1 parameter, 2 given (7 posts)

  1. normadize
    Member
    Posted 1 year ago #

    Using v0.70 on WP v3.5.1 I get the errors bellow. I think you meant to use __() rather than _().

    Warning: _() expects exactly 1 parameter, 2 given in /var/www/{DOMAIN}/wp-content/plugins/email-encoder-bundle/email-encoder-bundle.php on line 749
    
    Warning: _() expects exactly 1 parameter, 2 given in /var/www/{DOMAIN}/wp-content/plugins/email-encoder-bundle/email-encoder-bundle.php on line 751
    
    Warning: _() expects exactly 1 parameter, 2 given in /var/www/{DOMAIN}/wp-content/plugins/email-encoder-bundle/email-encoder-bundle.php on line 752

    Cheers.

    http://wordpress.org/extend/plugins/email-encoder-bundle/

  2. Opally
    Member
    Posted 1 year ago #

    I'm seeing the same problem. Thanks normadize for the solution. I changed these lines:

    . ' title="' . _('Succesfully Encoded (this is a check and only visible when logged in as
    admin)', $this->domain) . '">'
    		. '<img class="encoded-check-icon" src="' . plugins_url('images/icon-
    email-encoder-bundle.png', __FILE__)
    		. '" alt="' . _('Encoded', $this->domain) . '" />'
    		. _('Succesfully Encoded', $this->domain) . '</a>';

    to

    . ' title="' . __('Succesfully Encoded (this is a check and only visible when logged in as
    admin)', $this->domain) . '">'
    		. '<img class="encoded-check-icon" src="' . plugins_url('images/icon-
    email-encoder-bundle.png', __FILE__)
    		. '" alt="' . __('Encoded', $this->domain) . '" />'
    		. __('Succesfully Encoded', $this->domain) . '</a>';
  3. normadize
    Member
    Posted 1 year ago #

    Yes, just replace _() with __() -- note the double underscore.

    Interesting how this one escaped the developer - unless he doesn't have display errors enabled? but that would be against the principles of developing :)

    I'm sure he'll fix it soon.

  4. freelancephp
    Member
    Plugin Author

    Posted 1 year ago #

    Normandize, you are right. I used the wrong method. Try to fix it asap.

    Gr, Victor

  5. Opally
    Member
    Posted 1 year ago #

    note that "Successfully" is misspelled, too.

  6. scirceo
    Member
    Posted 1 year ago #

    Glad this explanation and fix are here. That was a shocker to see this problem.

  7. freelancephp
    Member
    Plugin Author

    Posted 1 year ago #

    Should be OK now (version 0.71).

    Thanks for reporting this issue.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic