From 80e4887a4294fe963a1f0140fe126708ad2b094c Mon Sep 17 00:00:00 2001 From: Miika Arponen Date: Thu, 2 Feb 2023 17:02:08 +0200 Subject: [PATCH] PHP 8.1 compatibility fix --- CHANGELOG.md | 5 +++++ plugin.php | 2 +- src/Utility.php | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2565d61..6b94e4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [1.16.2] - 2023-02-02 + +### Changed +- PHP 8.1 compatibility fix + ## [1.16.1] - 2023-01-23 ### Changed diff --git a/plugin.php b/plugin.php index 59caaad..3a49969 100644 --- a/plugin.php +++ b/plugin.php @@ -3,7 +3,7 @@ * Plugin Name: RediPress * Plugin URI: https://github.com/devgeniem/redipress * Description: A WordPress plugin that provides a blazing fast search engine and WP Query performance enhancements. - * Version: 1.16.1 + * Version: 1.16.2 * Author: Geniem * Author URI: http://www.geniem.fi/ * License: GPL3 diff --git a/src/Utility.php b/src/Utility.php index f7779d3..d76c91b 100644 --- a/src/Utility.php +++ b/src/Utility.php @@ -28,7 +28,7 @@ public static function format( array $source ) : array { $source = self::recursive_to_string( $source ); // Remove possible first integer - if ( filter_var( $source[0], FILTER_VALIDATE_INT ) ) { + if ( isset( $source[0] ) && filter_var( $source[0], FILTER_VALIDATE_INT ) ) { unset( $source[0] ); }