WordPress.org

Support

Support » Plugins and Hacks » [Resolved] error _() expects 1 parameter, 2 given

[Resolved] error _() expects 1 parameter, 2 given

  • 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/

Viewing 6 replies - 1 through 6 (of 6 total)
  • 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>';

    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.

    Plugin Author FineWebdev

    @freelancephp

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

    Gr, Victor

    note that “Successfully” is misspelled, too.

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

    Plugin Author FineWebdev

    @freelancephp

    Should be OK now (version 0.71).

    Thanks for reporting this issue.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] error _() expects 1 parameter, 2 given’ is closed to new replies.