Skip to content

Commit 57bdf1b

Browse files
committed
Replace ISNULL with IS NULL
Using the isnull function is also safe to use but is not semantically correct to use. This function is used in select statements to format the selected data based on the value of the column that is selected.
1 parent c480ab6 commit 57bdf1b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

library/EngineBlock/Corto/Model/Consent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ private function _hasStoredConsent(ServiceProvider $serviceProvider, $consentTyp
194194
AND service_id = ?
195195
AND attribute = ?
196196
AND consent_type = ?
197-
AND ISNULL(deleted_at)
197+
AND deleted_at IS NULL
198198
";
199199
$hashedUserId = sha1($this->_getConsentUid());
200200
$parameters = array(

library/EngineBlock/User.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function getConsent()
6060
$pdo = $this->_getDatabaseConnection();
6161
$query = 'SELECT service_id FROM consent
6262
WHERE hashed_user_id = ?
63-
AND ISNULL(deleted_at)';
63+
AND deleted_at IS NULL';
6464
$parameters = array(
6565
sha1($this->getUid())
6666
);

src/OpenConext/EngineBlockBundle/Authentication/Repository/DbalConsentRepository.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function findAllFor($userId)
6767
WHERE
6868
hashed_user_id=:hashed_user_id
6969
AND
70-
ISNULL(deleted_at)
70+
deleted_at IS NULL
7171
';
7272

7373
try {
@@ -129,7 +129,7 @@ public function deleteOneFor(string $userId, string $serviceProviderEntityId): b
129129
hashed_user_id = :hashed_user_id
130130
AND
131131
service_id = :service_id
132-
AND ISNULL(deleted_at)
132+
AND deleted_at IS NULL
133133
';
134134
try {
135135
$result = $this->connection->executeQuery(

0 commit comments

Comments
 (0)