2016-04-28 7 views
0

私はwoocommerceウェブサイトのコメントにこのエラーがあります。 私は問題は電子メールであると思いますが、どのように それを解決するために警告:strlen()は、パラメータ1が文字列であることを予期しています。行2481のformatting.phpで指定されたオブジェクト

警告助けてください:strlenを()がライン2481上formatting.phpに

ライン2481を指定されたオブジェクトがあり、パラメータ1が文字列であることを期待します二行目、このエラーはコメントエリアにある、私はそれがどこから来るのかを正確に知らないあなたの答えのための

<code> 
// Test for the minimum length the email can be 
if (strlen($email) < 3) { 
    /** 
    * Filter whether an email address is valid. 
    * 
    * This filter is evaluated under several different contexts, such as 'email_too_short', 
    * 'email_no_at', 'local_invalid_chars', 'domain_period_sequence', 'domain_period_limits', 
    * 'domain_no_periods', 'sub_hyphen_limits', 'sub_invalid_chars', or no specific context. 
</code> 
+2

エラーは、オブジェクトをstrlen関数に渡していることを意味します。 $ emailはオブジェクトです。 この$電子メールはどこから来たのですか? –

答えて

0

おかげで私の友人 、 、私は考えてコメントを投稿したユーザーの 電子メール、サイトで0、側にそれぞれコメントが投稿されました。このエラーも表示されます

コードを削除できますか?

コードはここにある:

<code> 

/** * は、メールが有効であることを確認します。 * * i18nドメインをgrokしません。 RFC準拠ではありません。 * * @since 0.71 * * @param string $ email確認するメールアドレス。 * @param bool $ deprecated推奨されていません。 * @return string | bool falseまたは有効な電子メールアドレスです。 */ 関数is_email($メール、$偽=非推奨){ _deprecated_argument(FUNCTION、 '3.0')の場合(空($廃止予定)!)。

// Test for the minimum length the email can be 
if (strlen($email) < 3) { 
    /** 
    * Filter whether an email address is valid. 
    * 
    * This filter is evaluated under several different contexts, such as 'email_too_short', 
    * 'email_no_at', 'local_invalid_chars', 'domain_period_sequence', 'domain_period_limits', 
    * 'domain_no_periods', 'sub_hyphen_limits', 'sub_invalid_chars', or no specific context. 
</code> 
関連する問題