From ddbb50472e5383629958295be9f063cf8124b41f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 3 Dec 2020 23:38:25 +0100 Subject: [PATCH] Continued: - confusing between valid() (current position is valid) and next() (next entry is valid) is fixed before MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- framework/main/classes/points/class_UserPoints.php | 4 ++-- framework/main/classes/user/class_BaseUser.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/framework/main/classes/points/class_UserPoints.php b/framework/main/classes/points/class_UserPoints.php index 5370599b..91e7a11e 100644 --- a/framework/main/classes/points/class_UserPoints.php +++ b/framework/main/classes/points/class_UserPoints.php @@ -128,7 +128,7 @@ class UserPoints extends BaseFrameworkSystem implements Registerable, BookablePo $this->getResultInstance()->rewind(); // Do we have an entry? - if ($this->getResultInstance()->next()) { + if ($this->getResultInstance()->valid()) { // Get the entry $currEntry = $this->getResultInstance()->current(); @@ -151,7 +151,7 @@ class UserPoints extends BaseFrameworkSystem implements Registerable, BookablePo $this->getResultInstance()->rewind(); // Do we have an entry? - if ($this->getResultInstance()->next()) { + if ($this->getResultInstance()->valid()) { // Get the entry $currentEntry = $this->getResultInstance()->current(); diff --git a/framework/main/classes/user/class_BaseUser.php b/framework/main/classes/user/class_BaseUser.php index 1a2da22e..f5fb074e 100644 --- a/framework/main/classes/user/class_BaseUser.php +++ b/framework/main/classes/user/class_BaseUser.php @@ -163,7 +163,7 @@ abstract class BaseUser extends BaseFrameworkSystem implements Updateable { $this->getResultInstance()->rewind(); // Search for it - if ($this->getResultInstance()->next()) { + if ($this->getResultInstance()->valid()) { // Entry found $exists = true; } // END - if @@ -207,7 +207,7 @@ abstract class BaseUser extends BaseFrameworkSystem implements Updateable { $this->getResultInstance()->rewind(); // Search for it - if ($this->getResultInstance()->next()) { + if ($this->getResultInstance()->valid()) { // Entry found $exists = true; -- 2.39.5