admin管理员组文章数量:1318572
I migrated my WordPress (multisite) website from PHP 7.4 to PHP 8.3.6 and got the following error:
Fatal error: Uncaught Error: Call to undefined function wp_kses() in /home/devnote/www/wp-includes/functions.php:6073
Stack trace:
#0 /home/devnote/www/wp-includes/functions.php(5554): wp_trigger_error()
#1 /home/devnote/www/wp-includes/class-wpdb.php(1333): _deprecated_function()
#2 /home/devnote/www/wp-content/sunrise.php(11): wpdb->escape()
#3 /home/devnote/www/wp-includes/ms-settings.php(47): include_once('...')
#4 /home/devnote/www/wp-settings.php(155): require('...')
#5 /home/devnote/www/wp-config.php(107): require_once('...')
#6 /home/devnote/www/wp-load.php(50): require_once('...')
#7 /home/devnote/www/wp-blog-header.php(13): require_once('...')
#8 /home/devnote/www/index.php(17): require('...')
#9 {main} thrown in /home/devnote/www/wp-includes/functions.php on line 6073
./wp-includes/functions.php:
$message = wp_kses(
$message,
array(
'a' => array( 'href' => true ),
'br' => array(),
'code' => array(),
'em' => array(),
'strong' => array(),
),
array( 'http', 'https' )
);
Where can this error come from?
I disabled the plugins and changed the theme, see here for details, but it did not help.
WordPress version is 6.7.1 (latest).
After updating to the latest WordPress version 6.7.1 the line numbers changed a little:
Fatal error: Uncaught Error: Call to undefined function wp_kses() in /home/devnote/www/wp-includes/functions.php:6098 Stack trace:
#0 /home/devnote/www/wp-includes/functions.php(5579): wp_trigger_error()
#1 /home/devnote/www/wp-includes/class-wpdb.php(1333): _deprecated_function()
#2 /home/devnote/www/wp-content/sunrise.php(11): wpdb->escape()
#3 /home/devnote/www/wp-includes/ms-settings.php(47): include_once('...')
#4 /home/devnote/www/wp-settings.php(156): require('...')
#5 /home/devnote/www/wp-config.php(107): require_once('...')
#6 /home/devnote/www/wp-load.php(50): require_once('...')
#7 /home/devnote/www/wp-blog-header.php(13): require_once('...')
#8 /home/devnote/www/index.php(17): require('...')
#9 {main} thrown in /home/devnote/www/wp-includes/functions.php on line 6098
The screenshot of my Multisite Admin panel:
I migrated my WordPress (multisite) website from PHP 7.4 to PHP 8.3.6 and got the following error:
Fatal error: Uncaught Error: Call to undefined function wp_kses() in /home/devnote/www/wp-includes/functions.php:6073
Stack trace:
#0 /home/devnote/www/wp-includes/functions.php(5554): wp_trigger_error()
#1 /home/devnote/www/wp-includes/class-wpdb.php(1333): _deprecated_function()
#2 /home/devnote/www/wp-content/sunrise.php(11): wpdb->escape()
#3 /home/devnote/www/wp-includes/ms-settings.php(47): include_once('...')
#4 /home/devnote/www/wp-settings.php(155): require('...')
#5 /home/devnote/www/wp-config.php(107): require_once('...')
#6 /home/devnote/www/wp-load.php(50): require_once('...')
#7 /home/devnote/www/wp-blog-header.php(13): require_once('...')
#8 /home/devnote/www/index.php(17): require('...')
#9 {main} thrown in /home/devnote/www/wp-includes/functions.php on line 6073
./wp-includes/functions.php:
$message = wp_kses(
$message,
array(
'a' => array( 'href' => true ),
'br' => array(),
'code' => array(),
'em' => array(),
'strong' => array(),
),
array( 'http', 'https' )
);
Where can this error come from?
I disabled the plugins and changed the theme, see here for details, but it did not help.
WordPress version is 6.7.1 (latest).
After updating to the latest WordPress version 6.7.1 the line numbers changed a little:
Fatal error: Uncaught Error: Call to undefined function wp_kses() in /home/devnote/www/wp-includes/functions.php:6098 Stack trace:
#0 /home/devnote/www/wp-includes/functions.php(5579): wp_trigger_error()
#1 /home/devnote/www/wp-includes/class-wpdb.php(1333): _deprecated_function()
#2 /home/devnote/www/wp-content/sunrise.php(11): wpdb->escape()
#3 /home/devnote/www/wp-includes/ms-settings.php(47): include_once('...')
#4 /home/devnote/www/wp-settings.php(156): require('...')
#5 /home/devnote/www/wp-config.php(107): require_once('...')
#6 /home/devnote/www/wp-load.php(50): require_once('...')
#7 /home/devnote/www/wp-blog-header.php(13): require_once('...')
#8 /home/devnote/www/index.php(17): require('...')
#9 {main} thrown in /home/devnote/www/wp-includes/functions.php on line 6098
The screenshot of my Multisite Admin panel:
Share Improve this question edited Jan 21 at 13:27 hakre 198k55 gold badges447 silver badges855 bronze badges Recognized by PHP Collective asked Jan 21 at 10:58 DmitrianoDmitriano 2,06015 silver badges48 bronze badges 12 | Show 7 more comments1 Answer
Reset to default 2You have an old sunrise.php
file left over in the wp-content/ folder.
It is a drop-in file (compare with Must-Use Plugins and Drop-Ins on my blog).
And it gets included if the constant named SUNRISE
is defined.
Check your ./wp-config.php file if it is defined there (or otherwise search the string in PHP files) and uncomment the line.
This then will prevent the drop-in from being loaded and most likely things will work again. If the operations in the file are actually required for your multi-site setup, you have to update the code there in and replace deprecated functionality. But probably it is just an oversight since some version 3 of the installation.
本文标签: wordpressUncaught Error Call to undefined function wpkses() with PHP 836Stack Overflow
版权声明:本文标题:wordpress - Uncaught Error: Call to undefined function wp_kses() with PHP 8.3.6 - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742047878a2417896.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
wp_kses
is not a function offered by PHP 7 or 8 – Nico Haase Commented Jan 21 at 11:04wp-includes/kses.php
, but I could not tell you whether that has already been included when the code in functions.php executes. (You could try to embed it yourself in there usingrequire_once
, and see if that changes things.) But a mere switch of the PHP version should not have caused this error. – C3roe Commented Jan 21 at 11:06sunrise.php
file is out of date. It must not callwpdb->escape()
in line 11. And disable the opcache until you get it running. – hakre Commented Jan 21 at 11:24