Skip to content

Commit 271201f

Browse files
Merge branch '3.4' into 4.4
* 3.4: [Filesystem] fix for PHP 8
2 parents 8deb195 + db5e758 commit 271201f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Store/PdoStore.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use Doctrine\DBAL\Connection;
1515
use Doctrine\DBAL\DBALException;
16-
use Doctrine\DBAL\Driver\Result;
1716
use Doctrine\DBAL\DriverManager;
1817
use Doctrine\DBAL\Exception;
1918
use Doctrine\DBAL\Schema\Schema;
@@ -173,7 +172,7 @@ public function putOffExpiration(Key $key, $ttl)
173172
$result = $stmt->execute();
174173

175174
// If this method is called twice in the same second, the row wouldn't be updated. We have to call exists to know if we are the owner
176-
if (!($result instanceof Result ? $result : $stmt)->rowCount() && !$this->exists($key)) {
175+
if (!(\is_object($result) ? $result : $stmt)->rowCount() && !$this->exists($key)) {
177176
throw new LockConflictedException();
178177
}
179178

@@ -205,7 +204,7 @@ public function exists(Key $key)
205204
$stmt->bindValue(':token', $this->getUniqueToken($key));
206205
$result = $stmt->execute();
207206

208-
return (bool) ($result instanceof Result ? $result->fetchOne() : $stmt->fetchColumn());
207+
return (bool) (\is_object($result) ? $result->fetchOne() : $stmt->fetchColumn());
209208
}
210209

211210
/**

0 commit comments

Comments
 (0)