Skip to content

Commit

Permalink
Bump version 2.2.23
Browse files Browse the repository at this point in the history
  • Loading branch information
GM-Alex committed Sep 21, 2023
1 parent e04e9a1 commit 68ee412
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 14 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "User Access Manager plugin for Wordpress",
"type": "wordpress-plugin",
"license": "GPL-2.0",
"version": "2.2.22",
"version": "2.2.23",
"authors": [
{
"name": "Alexander Schneider",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "user-access-manager",
"version": "2.2.22",
"version": "2.2.23",
"description": "[![Build Status](https://travis-ci.org/GM-Alex/user-access-manager.svg)](https://travis-ci.org/GM-Alex/user-access-manager)",
"main": "index.js",
"directories": {
Expand Down
7 changes: 5 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Contributors: GM_Alex
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=1947052
Tags: admin, access, member area, members, member, member access, page, pages, post, posts, private, privacy, restrict, user, user access manager, user management
Requires at least: 4.7
Tested up to: 6.2
Stable tag: 2.2.22
Tested up to: 6.3
Stable tag: 2.2.23

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

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

Version Date Changes

2.2.23 2023/05/26 Fix typos
Fix version_compare

2.2.22 2023/05/26 Minor change

2.2.21 2023/05/25 Adjust database compatibility #368
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ public function getCharset(): string
{
$charsetCollate = '';

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

if (version_compare($mySlqVersion, '4.1.0', '>=')) {
if (!empty($this->wpDatabase->charset)) {
Expand Down
8 changes: 4 additions & 4 deletions src/Setup/Database/DatabaseHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -329,14 +329,14 @@ public function isDatabaseUpdateNecessary(): bool
$currentDbVersion = $this->database->getVariable($select);

if ($currentDbVersion !== null
&& version_compare($currentDbVersion, UserAccessManager::DB_VERSION, '<') === true
&& version_compare((string) $currentDbVersion, UserAccessManager::DB_VERSION, '<') === true
) {
return true;
}
}
}

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

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

if (empty($currentDbVersion) === true
|| version_compare($currentDbVersion, '1.2', '<') === true
Expand Down Expand Up @@ -486,7 +486,7 @@ private function getOrderedDatabaseUpdates(): array
*/
public function updateDatabase(): bool
{
$currentDbVersion = $this->wordpress->getOption('uam_db_version');
$currentDbVersion = (string) $this->wordpress->getOption('uam_db_version');

if (empty($currentDbVersion) === true) {
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/Setup/SetupHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public function install($networkWide = false)
*/
public function update(): bool
{
$uamVersion = $this->wordpress->getOption('uam_version', '0');
$uamVersion = (string) $this->wordpress->getOption('uam_version', '0');

if (version_compare($uamVersion, '1.0', '<') === true) {
$this->wordpress->deleteOption('allow_comments_locked');
Expand Down
2 changes: 1 addition & 1 deletion src/UserAccessManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
*/
class UserAccessManager
{
const VERSION = '2.2.22';
const VERSION = '2.2.23';
const DB_VERSION = '1.6.2';

/**
Expand Down
6 changes: 3 additions & 3 deletions user-access-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: User Access Manager
* Plugin URI: https://wordpress.org/plugins/user-access-manager/
* Author URI: https://twitter.com/GM_Alex
* Version: 2.2.22
* Version: 2.2.23
* Requires PHP: 7.2
* Author: Alexander Schneider
* Description: Manage the access to your posts, pages, categories and files.
Expand Down Expand Up @@ -39,7 +39,7 @@
//--- Check requirements ---

//Check php version
if (version_compare(phpversion(), '7.2') === -1) {
if (version_compare((string) phpversion(), '7.2') === -1) {
add_action(
'admin_notices',
function () {
Expand All @@ -55,7 +55,7 @@ function () {
//Check wordpress version
global $wp_version;

if (version_compare($wp_version, '4.6') === -1) {
if (version_compare((string) $wp_version, '4.6') === -1) {
add_action(
'admin_notices',
function () use ($wp_version) {
Expand Down

0 comments on commit 68ee412

Please sign in to comment.