From 80338e1260dec2823155b9682924ef226dc0fd0b Mon Sep 17 00:00:00 2001 From: Jonas Staudenmeir Date: Thu, 23 May 2024 20:38:25 +0200 Subject: [PATCH] Fix SQL Server detection in database store (#51547) --- src/Illuminate/Cache/DatabaseStore.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Illuminate/Cache/DatabaseStore.php b/src/Illuminate/Cache/DatabaseStore.php index e5b72107ce96..b8026e3e0de9 100755 --- a/src/Illuminate/Cache/DatabaseStore.php +++ b/src/Illuminate/Cache/DatabaseStore.php @@ -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; }