openrat-cms

# OpenRat Content Management System
git clone http://git.code.weiherhei.de/openrat-cms.git
Log | Files | Refs

commit bff91d0650531bacc6fb183a26061cf6d4eddb05
parent 5040c278741e4920d88d2f96a5f23f84c111a3cd
Author: Jan Dankert <develop@jandankert.de>
Date:   Mon, 20 May 2019 20:47:06 +0200

Fix: empty() darf keine Ausdrücke als Parameter erhalten (now compatible with PHP 5.4 again).

Diffstat:
modules/cms-core/Dispatcher.class.php | 2+-
modules/cms-core/action/GroupAction.class.php | 2+-
modules/cms-core/action/UserAction.class.php | 2+-
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/cms-core/Dispatcher.class.php b/modules/cms-core/Dispatcher.class.php @@ -351,7 +351,7 @@ class Dispatcher { if ( $this->request->hasRequestVar('dbid') ) $dbid = $this->request->getRequestVar('dbid',OR_FILTER_ALPHANUM); - elseif ( !empty( Session::getDatabaseId())) + elseif ( Session::getDatabaseId() ) $dbid = Session::getDatabaseId(); elseif ( isset($_COOKIE['or_dbid']) ) $dbid = $_COOKIE['or_dbid']; diff --git a/modules/cms-core/action/GroupAction.class.php b/modules/cms-core/action/GroupAction.class.php @@ -85,7 +85,7 @@ class GroupAction extends Action public function propPost() { - if ( empty($this->getRequestVar('name') ) ) + if ( ! $this->getRequestVar('name') ) throw new \ValidationException('name'); $this->group->name = $this->getRequestVar('name'); diff --git a/modules/cms-core/action/UserAction.class.php b/modules/cms-core/action/UserAction.class.php @@ -72,7 +72,7 @@ class UserAction extends Action public function propPost() { - if ( empty( $this->getRequestVar('name') ) ) + if ( ! $this->getRequestVar('name') ) throw new \ValidationException( 'name'); // Benutzer speichern