簡體   English   中英

我在 Wordpress 中的網絡管理儀表板上出錯

[英]Error on my Network Admin Dashboard in Wordpress

所以我的 Wordpress 網站上的網絡管理儀表板在頂部給了我這個錯誤:

注意: is_current_page 被錯誤地調用。 在可以准確確定當前頁面是什么之前調用函數。 有關更多信息,請參閱在 WordPress 中調試。 (此消息是在 4.5.6 版中添加的。)在第 4139 行的 /var/www/html/wp-includes/functions.php

它重復了很多次。 我怎樣才能讓它消失? 它發生在我刪除了一個導致另一個插件出現問題的插件之后。

任何建議將不勝感激!

這是在第 4139 行:

 * Filters whether to trigger an error for _doing_it_wrong() calls.
 *
 * @since 3.1.0
 *
 * @param bool $trigger Whether to trigger the error for _doing_it_wrong() calls. Default true.
 */
if ( WP_DEBUG && apply_filters( 'doing_it_wrong_trigger_error', true ) ) {
    if ( function_exists( '__' ) ) {
        if ( is_null( $version ) ) {
            $version = '';
        } else {
            /* translators: %s: version number */
            $version = sprintf( __( '(This message was added in version %s.)' ), $version );
        }
        /* translators: %s: Codex URL */
        $message .= ' ' . sprintf( __( 'Please see <a href="%s">Debugging in WordPress</a> for more information.' ),
            __( 'https://codex.wordpress.org/Debugging_in_WordPress' )
        );
        /* translators: Developer debugging message. 1: PHP function name, 2: Explanatory message, 3: Version information message */
        trigger_error( sprintf( __( '%1$s was called <strong>incorrectly</strong>. %2$s %3$s' ), $function, $message, $version ) );
    } else {
        if ( is_null( $version ) ) {
            $version = '';
        } else {
            $version = sprintf( '(This message was added in version %s.)', $version );
        }
        $message .= sprintf( ' Please see <a href="%s">Debugging in WordPress</a> for more information.',
            'https://codex.wordpress.org/Debugging_in_WordPress'
        );
        trigger_error( sprintf( '%1$s was called <strong>incorrectly</strong>. %2$s %3$s', $function, $message, $version ) );
    }
}

我通過在第 4139 行之前添加 @ 來消除錯誤。

@trigger_error( sprintf( __( '%1$s 被錯誤調用。%2$s %3$s' ), $function, $message, $version );

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM