Skip to content

Commit

Permalink
Fix SQL Server detection in database store (#51547)
Browse files Browse the repository at this point in the history
  • Loading branch information
staudenmeir authored May 23, 2024
1 parent 240c8a0 commit 80338e1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Illuminate/Cache/DatabaseStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,7 @@ public function add($key, $value, $seconds)
$value = $this->serialize($value);
$expiration = $this->getTime() + $seconds;

$doesntSupportInsertOrIgnore = [SqlServerConnection::class];

if (! in_array(get_class($this->getConnection()), $doesntSupportInsertOrIgnore)) {
if (! $this->getConnection() instanceof SqlServerConnection) {
return $this->table()->insertOrIgnore(compact('key', 'value', 'expiration')) > 0;
}

Expand Down

0 comments on commit 80338e1

Please sign in to comment.