From 1f9f321d54c2b5e774008616a5534d7012ff261e Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 28 Apr 2020 21:13:37 +0000 Subject: [PATCH 1/2] Issue 8557: We have to fetch only a single row --- src/Model/Register.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Model/Register.php b/src/Model/Register.php index 5eb9a417c..81551d2b9 100644 --- a/src/Model/Register.php +++ b/src/Model/Register.php @@ -56,7 +56,7 @@ class Register */ public static function getPendingForUser(int $uid) { - return DBA::selectToArray('pending-view', [], ['uid' => $uid]); + return DBA::select('pending-view', [], ['uid' => $uid, 'self' => true]); } /** From 00ef29fb97c4bbf69a1e7272e0ec19711713a37b Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 29 Apr 2020 01:40:59 +0000 Subject: [PATCH 2/2] It has to be "selectFirst" --- src/Model/Register.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Model/Register.php b/src/Model/Register.php index 81551d2b9..f4d409bc3 100644 --- a/src/Model/Register.php +++ b/src/Model/Register.php @@ -56,7 +56,7 @@ class Register */ public static function getPendingForUser(int $uid) { - return DBA::select('pending-view', [], ['uid' => $uid, 'self' => true]); + return DBA::selectFirst('pending-view', [], ['uid' => $uid, 'self' => true]); } /**