From e3c18fddaa77d8f290b39279cb78ab53093ed86a Mon Sep 17 00:00:00 2001 From: Hai Zheng Date: Mon, 27 Nov 2023 14:41:10 -0500 Subject: [PATCH] =?UTF-8?q?v6.0-rc3:=20*=20=F0=9F=90=9E**Page=20Optimize**?= =?UTF-8?q?=20Fixed=20a=20fatal=20PHP=20error=20caused=20by=20the=20WHM=20?= =?UTF-8?q?plugin's=20Mass=20Enable=20for=20services=20not=20in=20use.=20(?= =?UTF-8?q?Michael)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- litespeed-cache.php | 4 ++-- readme.txt | 1 + src/data.cls.php | 8 ++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/litespeed-cache.php b/litespeed-cache.php index 3831a72b6..9e558ec28 100644 --- a/litespeed-cache.php +++ b/litespeed-cache.php @@ -4,7 +4,7 @@ * Plugin Name: LiteSpeed Cache * Plugin URI: https://www.litespeedtech.com/products/cache-plugins/wordpress-acceleration * Description: High-performance page caching and site optimization from LiteSpeed - * Version: 6.0-rc2 + * Version: 6.0-rc3 * Author: LiteSpeed Technologies * Author URI: https://www.litespeedtech.com * License: GPLv3 @@ -34,7 +34,7 @@ return; } -!defined('LSCWP_V') && define('LSCWP_V', '6.0-rc2'); +!defined('LSCWP_V') && define('LSCWP_V', '6.0-rc3'); !defined('LSCWP_CONTENT_DIR') && define('LSCWP_CONTENT_DIR', WP_CONTENT_DIR); !defined('LSCWP_DIR') && define('LSCWP_DIR', __DIR__ . '/'); // Full absolute path '/var/www/html/***/wp-content/plugins/litespeed-cache/' or MU diff --git a/readme.txt b/readme.txt index 0e401a9e7..4178adfa8 100644 --- a/readme.txt +++ b/readme.txt @@ -265,6 +265,7 @@ The vast majority of plugins and themes are compatible with LiteSpeed Cache. The * **VPI** VPI can now support non-alphabet filenames. * **VPI** Fixed PHP8.2 deprecated warning. (Ryan D) * **ESI** Fixed ESI nonce showing only HTML comment issue. (Giorgos K.) +* 🐞**Page Optimize** Fixed a fatal PHP error caused by the WHM plugin's Mass Enable for services not in use. (Michael) * 🐞**Network** Fix in-memory options for multisites. (Tynan #588) * **Network** Correct `Disable All Features` link for Multisite. * 🐞**Image Optimize** Removing original image will also remove optimized images. diff --git a/src/data.cls.php b/src/data.cls.php index 6b6afbe90..e9c4d5d7e 100644 --- a/src/data.cls.php +++ b/src/data.cls.php @@ -1,4 +1,5 @@ */ + namespace LiteSpeed; + defined('WPINC') || exit(); class Data extends Root @@ -454,6 +457,11 @@ public function table_truncate($tb) public function url_file_clean($file_type) { global $wpdb; + + if (!$this->tb_exist('url_file')) { + return; + } + $type = $this->_url_file_types[$file_type]; $q = 'DELETE FROM ' . $this->tb('url_file') . ' WHERE `type` = %d'; $wpdb->query($wpdb->prepare($q, $type));