From: Roland Häder Date: Thu, 3 Dec 2020 22:38:25 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ddbb50472e5383629958295be9f063cf8124b41f;p=core.git Continued: - confusing between valid() (current position is valid) and next() (next entry is valid) is fixed before Signed-off-by: Roland Häder --- 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;