Skip to content

Commit efb1730

Browse files
Merge branch '4.4' into 5.1
* 4.4: [Filesystem] fix for PHP 8 [Cache] fix DBAL v3 compat Bump Symfony version to 4.4.15 Update VERSION for 4.4.14 Update CHANGELOG for 4.4.14 Bump Symfony version to 3.4.46 Update VERSION for 3.4.45 Update CONTRIBUTORS for 3.4.45 Update CHANGELOG for 3.4.45
2 parents b714b83 + 271201f commit efb1730

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;
@@ -163,7 +162,7 @@ public function putOffExpiration(Key $key, float $ttl)
163162
$result = $stmt->execute();
164163

165164
// 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
166-
if (!($result instanceof Result ? $result : $stmt)->rowCount() && !$this->exists($key)) {
165+
if (!(\is_object($result) ? $result : $stmt)->rowCount() && !$this->exists($key)) {
167166
throw new LockConflictedException();
168167
}
169168

@@ -195,7 +194,7 @@ public function exists(Key $key)
195194
$stmt->bindValue(':token', $this->getUniqueToken($key));
196195
$result = $stmt->execute();
197196

198-
return (bool) ($result instanceof Result ? $result->fetchOne() : $stmt->fetchColumn());
197+
return (bool) (\is_object($result) ? $result->fetchOne() : $stmt->fetchColumn());
199198
}
200199

201200
/**

0 commit comments

Comments
 (0)