Skip to content

Commit 80338e1

Browse files
authored
Fix SQL Server detection in database store (#51547)
1 parent 240c8a0 commit 80338e1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Illuminate/Cache/DatabaseStore.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,7 @@ public function add($key, $value, $seconds)
158158
$value = $this->serialize($value);
159159
$expiration = $this->getTime() + $seconds;
160160

161-
$doesntSupportInsertOrIgnore = [SqlServerConnection::class];
162-
163-
if (! in_array(get_class($this->getConnection()), $doesntSupportInsertOrIgnore)) {
161+
if (! $this->getConnection() instanceof SqlServerConnection) {
164162
return $this->table()->insertOrIgnore(compact('key', 'value', 'expiration')) > 0;
165163
}
166164

0 commit comments

Comments
 (0)