From d1cca0f3fb13a0e443ed2d523bbeb03e74a3591f Mon Sep 17 00:00:00 2001 From: 3Dgoo Date: Tue, 29 Dec 2020 16:45:58 +1030 Subject: [PATCH] Fix DataQuery::exists() not working correctly Fixes `DataQuery::exists()` not working correctly in some cases as discussed in #9809 --- src/ORM/DataQuery.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ORM/DataQuery.php b/src/ORM/DataQuery.php index 93d02b5c6..c15bb569d 100644 --- a/src/ORM/DataQuery.php +++ b/src/ORM/DataQuery.php @@ -485,7 +485,7 @@ class DataQuery $result = reset($row); // Checking for 't' supports PostgreSQL before silverstripe/postgresql@2.2 - return $result === true || $result === 1 || $result === 't'; + return $result === true || $result === 1 || $result === '1' || $result === 't'; } /**