From 654591c83be5744a0218b7a6ec753da78d3ccb23 Mon Sep 17 00:00:00 2001 From: Raam Dev Date: Sun, 25 Feb 2018 16:19:25 -0500 Subject: [PATCH 1/2] Replace deprecated create_function() with Closures create_function() has been deprecated as of PHP 7.2 Occurrences of create_function() in /plugin.php were intentionally excluded from this update as that source code is run when PHP < 5.4 is detected (Closures require PHP 5.4+). See websharks/comet-cache#921 --- src/includes/traits/Shared/FsUtils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/includes/traits/Shared/FsUtils.php b/src/includes/traits/Shared/FsUtils.php index 6785320b..696ac444 100644 --- a/src/includes/traits/Shared/FsUtils.php +++ b/src/includes/traits/Shared/FsUtils.php @@ -30,7 +30,7 @@ public function nDirSeps($dir_file, $allow_trailing_slash = false) } if (mb_strpos($dir_file, ':' !== false)) { if (preg_match('/^(?P[a-zA-Z])\:[\/\\\\]/u', $dir_file)) { - $dir_file = preg_replace_callback('/^(?P[a-zA-Z])\:[\/\\\\]/u', create_function('$m', 'return mb_strtoupper($m[0]);'), $dir_file); + $dir_file = preg_replace_callback('/^(?P[a-zA-Z])\:[\/\\\\]/u', function ($m) { return mb_strtoupper($m[0]); }, $dir_file); } } $dir_file = preg_replace('/\/+/u', '/', str_replace([DIRECTORY_SEPARATOR, '\\', '/'], '/', $dir_file)); From c0e4103969745256b067d3ea9ffdf7af7fc046e9 Mon Sep 17 00:00:00 2001 From: Raam Dev Date: Sun, 25 Feb 2018 16:23:24 -0500 Subject: [PATCH 2/2] Update changelog. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9839652..bc5c2cb1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - **Bug Fix** (Pro): The HTML Compressor was returning an empty string upon encountering an invalid UTF-8 sequence. See [Issue #871](https://github.com/websharks/comet-cache/issues/871) reported by a Comet Cache user. - **Compatibility** (Pro): Many improvements to the Pro software update system, including changes to the API Endpoints and the Proxy Fallback endpoint. See [Issue #879](https://github.com/websharks/comet-cache/issues/879) and [Issue #315](https://github.com/websharks/comet-cache-pro/pull/315) for full details. - **Compatibility**: Fixed a WooCommerce compatibility issue that was generating a "Notice: id was called incorrectly. Product properties should not be accessed directly." Props @vestaxpdx. See [Issue #896](https://github.com/websharks/comet-cache/issues/896). +- **Compatibility (PHP 7.2)**: Fixed "create_function() is deprecated" warnings for PHP 7.2. See [Issue #921](https://github.com/websharks/comet-cache/issues/921). - **Bug Fix:** Corrected a bug in the pro upgrader that prevented beta releases from being installed whenever they were desired by a site owner. Even when a site owner explicitly enabled beta release updates, they were not coming through due to problematic calls to `version_compare()` against a version with a dev-state suffix. This same bug was causing some oddities in version-specific upgrade routines, and in upgrade routines in general whenever a beta release was installed on top of an existing formal release state; i.e., when existing, previous version did not have a dev-state suffix, which is typical. Fixed all in this release. See [Issue #909 comment](https://github.com/websharks/comet-cache/issues/909#issuecomment-321953490). = v170220 =