From 24cd075e271cb6ed63e2e4a9e153de44d1e7a54c Mon Sep 17 00:00:00 2001 From: Stefan Kalscheuer Date: Sun, 21 Dec 2025 18:05:01 +0100 Subject: [PATCH 1/2] require PHP 7.4 or later (#47) --- README.md | 4 ++-- composer.json | 2 +- phpcs.xml | 2 +- statify-blacklist.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1f018d9..556a641 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ * Contributors: stklcode * Requires at least: 5.1 * Tested up to: 6.9 -* Requires PHP: 7.2 +* Requires PHP: 7.4 * Stable tag: 1.7.2 * License: GPLv2 or later * License URI: https://www.gnu.org/licenses/gpl-2.0.html @@ -55,7 +55,7 @@ The plugin is capable of handling multisite installations. * Goto _Settings_ -> _Statify Filter_ to configure the plugin ### Requirements ### -* PHP 7.2 or above +* PHP 7.4 or above * WordPress 5.1 or above * _Statify_ plugin installed and activated (1.5 or above) diff --git a/composer.json b/composer.json index a7f02aa..200e280 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ ], "type": "wordpress-plugin", "require": { - "php": ">=7.2", + "php": ">=7.4", "composer/installers": "~v2.3" }, "require-dev": { diff --git a/phpcs.xml b/phpcs.xml index 22dbc28..a146c36 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -26,6 +26,6 @@ - + diff --git a/statify-blacklist.php b/statify-blacklist.php index 5d7505b..98bdc2d 100644 --- a/statify-blacklist.php +++ b/statify-blacklist.php @@ -12,7 +12,7 @@ * Description: Extension for the Statify plugin to add customizable filters. (formerly "Statify Blacklist") * Version: 1.7.2 * Requires at least: 5.1 - * Requires PHP: 7.2 + * Requires PHP: 7.4 * Requires Plugins: statify * Author: Stefan Kalscheuer (@stklcode) * Author URI: https://www.stklcode.de From dd7d1aa966f70f1db7bf34749d423faf763e0718 Mon Sep 17 00:00:00 2001 From: Stefan Kalscheuer Date: Sun, 21 Dec 2025 18:05:48 +0100 Subject: [PATCH 2/2] use null-coalescing operator where applicable --- inc/class-statifyblacklist.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/class-statifyblacklist.php b/inc/class-statifyblacklist.php index 9b13d5d..3e07ea3 100644 --- a/inc/class-statifyblacklist.php +++ b/inc/class-statifyblacklist.php @@ -326,7 +326,7 @@ private static function get_referer(): string { private static function get_referer_domain(): string { $referer = wp_parse_url( self::get_referer() ); - return strtolower( ( isset( $referer['host'] ) ? $referer['host'] : '' ) ); + return strtolower( $referer['host'] ?? '' ); } /**