Fatal error with litespeed cache
-
I am getting the occasional fatal error using litespeed cache and this plugin.
It looks like liespped calls pre_kses very early and the sanitize_attributes function which is hooked to that action filter then causes the following fatal error: PHP Fatal error: Uncaught Error: Undefined constant “SECURE_AUTH_COOKIE”
This can be prevented by amending the function to instead be:
/**
* StripsattributesForBlocks
block attribute when the current user doesn't haveunfiltered_html
capabilities.
*
* @param string $content Content to filter through KSES.
*/
function sanitize_attributes($content) {
if (!defined('SECURE_AUTH_COOKIE')) {
require_once(ABSPATH . WPINC . '/default-constants.php');
}
if(!function_exists('wp_get_current_user')) {
require ABSPATH . WPINC . '/pluggable.php';
}
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Fatal error with litespeed cache’ is closed to new replies.