From fe86735b8b6cfd649cdb2d622059d5f89a85d4df Mon Sep 17 00:00:00 2001 From: Hugo Sales Date: Mon, 16 Aug 2021 17:07:00 +0100 Subject: [PATCH] [DB][DOCUMENTATION] Explain limit: 2 in findOneBy --- src/Core/DB/DB.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Core/DB/DB.php b/src/Core/DB/DB.php index 951c499405..06bf2458d2 100644 --- a/src/Core/DB/DB.php +++ b/src/Core/DB/DB.php @@ -175,7 +175,7 @@ abstract class DB */ public static function findOneBy(string $table, array $criteria, ?array $orderBy = null, ?int $offset = null) { - $res = self::findBy($table, $criteria, $orderBy, 2, $offset); + $res = self::findBy($table, $criteria, $orderBy, 2, $offset); // Use limit 2 to check for consistency switch (count($res)) { case 0: throw new NotFoundException("No value in table {$table} matches the requested criteria");