Skip to content

Commit 68ee412

Browse files
committed
Bump version 2.2.23
1 parent e04e9a1 commit 68ee412

8 files changed

+17
-14
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "User Access Manager plugin for Wordpress",
44
"type": "wordpress-plugin",
55
"license": "GPL-2.0",
6-
"version": "2.2.22",
6+
"version": "2.2.23",
77
"authors": [
88
{
99
"name": "Alexander Schneider",

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "user-access-manager",
3-
"version": "2.2.22",
3+
"version": "2.2.23",
44
"description": "[![Build Status](https://travis-ci.org/GM-Alex/user-access-manager.svg)](https://travis-ci.org/GM-Alex/user-access-manager)",
55
"main": "index.js",
66
"directories": {

readme.txt

+5-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Contributors: GM_Alex
33
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=1947052
44
Tags: admin, access, member area, members, member, member access, page, pages, post, posts, private, privacy, restrict, user, user access manager, user management
55
Requires at least: 4.7
6-
Tested up to: 6.2
7-
Stable tag: 2.2.22
6+
Tested up to: 6.3
7+
Stable tag: 2.2.23
88

99
With the "User Access Manager"-plugin you can manage the access to your posts, pages and files.
1010

@@ -63,6 +63,9 @@ Here you found the changes in each version.
6363

6464
Version Date Changes
6565

66+
2.2.23 2023/05/26 Fix typos
67+
Fix version_compare
68+
6669
2.2.22 2023/05/26 Minor change
6770

6871
2.2.21 2023/05/25 Adjust database compatibility #368

src/Database/Database.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ public function getCharset(): string
304304
{
305305
$charsetCollate = '';
306306

307-
$mySlqVersion = $this->getVariable('SELECT VERSION() as mysql_version');
307+
$mySlqVersion = (string) $this->getVariable('SELECT VERSION() as mysql_version');
308308

309309
if (version_compare($mySlqVersion, '4.1.0', '>=')) {
310310
if (!empty($this->wpDatabase->charset)) {

src/Setup/Database/DatabaseHandler.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -329,14 +329,14 @@ public function isDatabaseUpdateNecessary(): bool
329329
$currentDbVersion = $this->database->getVariable($select);
330330

331331
if ($currentDbVersion !== null
332-
&& version_compare($currentDbVersion, UserAccessManager::DB_VERSION, '<') === true
332+
&& version_compare((string) $currentDbVersion, UserAccessManager::DB_VERSION, '<') === true
333333
) {
334334
return true;
335335
}
336336
}
337337
}
338338

339-
$currentDbVersion = $this->wordpress->getOption('uam_db_version');
339+
$currentDbVersion = (string) $this->wordpress->getOption('uam_db_version');
340340
return version_compare($currentDbVersion, UserAccessManager::DB_VERSION, '<');
341341
}
342342

@@ -346,7 +346,7 @@ public function isDatabaseUpdateNecessary(): bool
346346
*/
347347
public function backupDatabase(): bool
348348
{
349-
$currentDbVersion = $this->wordpress->getOption('uam_db_version');
349+
$currentDbVersion = (string) $this->wordpress->getOption('uam_db_version');
350350

351351
if (empty($currentDbVersion) === true
352352
|| version_compare($currentDbVersion, '1.2', '<') === true
@@ -486,7 +486,7 @@ private function getOrderedDatabaseUpdates(): array
486486
*/
487487
public function updateDatabase(): bool
488488
{
489-
$currentDbVersion = $this->wordpress->getOption('uam_db_version');
489+
$currentDbVersion = (string) $this->wordpress->getOption('uam_db_version');
490490

491491
if (empty($currentDbVersion) === true) {
492492
return false;

src/Setup/SetupHandler.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public function install($networkWide = false)
139139
*/
140140
public function update(): bool
141141
{
142-
$uamVersion = $this->wordpress->getOption('uam_version', '0');
142+
$uamVersion = (string) $this->wordpress->getOption('uam_version', '0');
143143

144144
if (version_compare($uamVersion, '1.0', '<') === true) {
145145
$this->wordpress->deleteOption('allow_comments_locked');

src/UserAccessManager.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
*/
5151
class UserAccessManager
5252
{
53-
const VERSION = '2.2.22';
53+
const VERSION = '2.2.23';
5454
const DB_VERSION = '1.6.2';
5555

5656
/**

user-access-manager.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: User Access Manager
44
* Plugin URI: https://wordpress.org/plugins/user-access-manager/
55
* Author URI: https://twitter.com/GM_Alex
6-
* Version: 2.2.22
6+
* Version: 2.2.23
77
* Requires PHP: 7.2
88
* Author: Alexander Schneider
99
* Description: Manage the access to your posts, pages, categories and files.
@@ -39,7 +39,7 @@
3939
//--- Check requirements ---
4040

4141
//Check php version
42-
if (version_compare(phpversion(), '7.2') === -1) {
42+
if (version_compare((string) phpversion(), '7.2') === -1) {
4343
add_action(
4444
'admin_notices',
4545
function () {
@@ -55,7 +55,7 @@ function () {
5555
//Check wordpress version
5656
global $wp_version;
5757

58-
if (version_compare($wp_version, '4.6') === -1) {
58+
if (version_compare((string) $wp_version, '4.6') === -1) {
5959
add_action(
6060
'admin_notices',
6161
function () use ($wp_version) {

0 commit comments

Comments
 (0)