Podrška » Problemi » PHP Fatal error: Only variables can be passed by reference in

  • Hi,

    from recently there is something wrong with my mailing. I get:

    PHP Fatal error: Only variables can be passed by reference in /home/nomadihr/public_html/en/wp-includes/class-phpmailer.php on line 1104

    when i try submitting contact forms

    Thought problem was in contact form 7 plugin, but same happens with wp email capture plugin.

    Tried disabling all the plugins except for fusion core i need for template and CF7 same error

    Also same error when i disable all except wp email capture

    error log is the same. the only difference is that wpemaim capture throws 500 server error on screen to user probably due to redirect after submitting.

    Any ideas on the solution?

    This is the problem function

    public function punyencodeAddress($address)
    {
    // Verify we have required functions, CharSet, and at-sign.
    if ($this->idnSupported() and
    !empty($this->CharSet) and
    ($pos = strrpos($address, ‘@’)) !== false) {
    $domain = substr($address, ++$pos);
    // Verify CharSet string is a valid one, and domain properly encoded in this CharSet.
    if ($this->has8bitChars($domain) and @mb_check_encoding($domain, $this->CharSet)) {
    $domain = mb_convert_encoding($domain, ‘UTF-8’, $this->CharSet);
    if (($punycode = defined(‘INTL_IDNA_VARIANT_UTS46’) ?
    idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46) :
    idn_to_ascii($domain)) !== false) {
    return substr($address, 0, $pos) . $punycode;
    }
    }
    }
    return $address;
    }

    Line 1104 beeing:

    idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46) :

  • Tema ‘PHP Fatal error: Only variables can be passed by reference in’ je zaključana zbog novih odgovora.