From ad375a4fc7e1811a5418a1c07913c48f3505cabf Mon Sep 17 00:00:00 2001 From: Alexander Schneider Date: Sat, 13 Feb 2021 21:07:00 +0100 Subject: [PATCH] Bump version 2.2.3 --- composer.json | 2 +- package.json | 2 +- readme.txt | 5 ++++- src/Controller/Backend/SettingsController.php | 2 +- src/UserAccessManager.php | 2 +- src/UserGroup/UserGroupHandler.php | 4 ++-- tests/bootstrap.php | 4 ++++ user-access-manager.php | 2 +- 8 files changed, 15 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index cf125151..9782670c 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "User Access Manager plugin for Wordpress", "type": "wordpress-plugin", "license": "GPL-2.0", - "version": "2.2.2", + "version": "2.2.3", "authors": [ { "name": "Alexander Schneider", diff --git a/package.json b/package.json index 63103d79..40e5da83 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "user-access-manager", - "version": "2.2.2", + "version": "2.2.3", "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": { diff --git a/readme.txt b/readme.txt index c8ccffe8..2d87c273 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i 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: 5.6 -Stable tag: 2.2.2 +Stable tag: 2.2.3 With the "User Access Manager"-plugin you can manage the access to your posts, pages and files. @@ -59,6 +59,9 @@ Here you found the changes in each version. Version Date Changes + 2.2.3 2021/02/13 Fix warning at settings page. + Fix type error for user group handler. + 2.2.2 2021/02/13 Fix type error with login form. 2.2.1 2021/02/13 Fix type error with registeredTaxonomy. diff --git a/src/Controller/Backend/SettingsController.php b/src/Controller/Backend/SettingsController.php index 2730a9ec..12d585ca 100644 --- a/src/Controller/Backend/SettingsController.php +++ b/src/Controller/Backend/SettingsController.php @@ -264,7 +264,7 @@ private function getTaxonomySettingsForm($taxonomy = MainConfig::DEFAULT_TYPE): */ private function isXSendFileAvailable(): bool { - $content = file_get_contents($this->wordpress->getSiteUrl() . '?testXSendFile'); + $content = @file_get_contents($this->wordpress->getSiteUrl() . '?testXSendFile'); $this->fileHandler->removeXSendFileTestFile(); return ($content === 'success'); diff --git a/src/UserAccessManager.php b/src/UserAccessManager.php index d5723621..d5ca957e 100644 --- a/src/UserAccessManager.php +++ b/src/UserAccessManager.php @@ -50,7 +50,7 @@ */ class UserAccessManager { - const VERSION = '2.2.2'; + const VERSION = '2.2.3'; const DB_VERSION = '1.6.1'; /** diff --git a/src/UserGroup/UserGroupHandler.php b/src/UserGroup/UserGroupHandler.php index f41959a5..d1a37833 100644 --- a/src/UserGroup/UserGroupHandler.php +++ b/src/UserGroup/UserGroupHandler.php @@ -198,12 +198,12 @@ public function addUserGroup(UserGroup $userGroup) /** * Deletes a user group. - * @param int $userGroupId + * @param string|int $userGroupId * @return bool * @throws UserGroupTypeException * @throws Exception */ - public function deleteUserGroup(int $userGroupId): bool + public function deleteUserGroup($userGroupId): bool { $userGroups = $this->getUserGroups(); diff --git a/tests/bootstrap.php b/tests/bootstrap.php index ab67666d..3f961d54 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -24,6 +24,10 @@ class WP_Post_Type {} } +if (class_exists('\wpdb') === false) { + class wpdb {} +} + if (class_exists('\WP_Widget') === false) { require_once __DIR__.'/../vendor/johnpbloch/wordpress-core/wp-includes/class-wp-widget.php'; } diff --git a/user-access-manager.php b/user-access-manager.php index 4761da38..dc287491 100644 --- a/user-access-manager.php +++ b/user-access-manager.php @@ -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.2 + * Version: 2.2.3 * Author: Alexander Schneider * Description: Manage the access to your posts, pages, categories and files. * Text Domain: user-access-manager