diff --git a/src/filesystem/src/FilesystemManager.php b/src/filesystem/src/FilesystemManager.php index a03b6b3e6..429ac9b1f 100644 --- a/src/filesystem/src/FilesystemManager.php +++ b/src/filesystem/src/FilesystemManager.php @@ -379,7 +379,7 @@ function (&$parent) use ($config) { */ protected function createFlysystem(FlysystemAdapter $adapter, array $config): FilesystemOperator { - if ($config['read-only'] ?? false === true) { + if (($config['read-only'] ?? false) === true) { /* @phpstan-ignore-next-line */ $adapter = new ReadOnlyFilesystemAdapter($adapter); } diff --git a/src/foundation/src/Testing/TestResponseAssert.php b/src/foundation/src/Testing/TestResponseAssert.php index 71a90780f..0fbb673ac 100644 --- a/src/foundation/src/Testing/TestResponseAssert.php +++ b/src/foundation/src/Testing/TestResponseAssert.php @@ -61,7 +61,7 @@ public static function __callStatic(string $name, array $arguments): void */ protected function injectResponseContext(ExpectationFailedException $exception): ExpectationFailedException { - if ($this->response->getHeader('Content-Type') === 'application/json') { + if (str_contains($this->response->getHeader('Content-Type')[0] ?? '', 'application/json')) { $testJson = new AssertableJsonString($this->response->getContent()); if (isset($testJson['errors'])) { diff --git a/src/session/src/Middleware/StartSession.php b/src/session/src/Middleware/StartSession.php index 7a67a5674..af0d74ff5 100644 --- a/src/session/src/Middleware/StartSession.php +++ b/src/session/src/Middleware/StartSession.php @@ -158,7 +158,7 @@ protected function configHitsLottery(array $config): bool protected function storeCurrentUrl(Session $session): void { if ($this->request->isMethod('GET') - && ! $this->request->header('X-Requested-With') === 'XMLHttpRequest' // is not ajax + && $this->request->header('X-Requested-With') !== 'XMLHttpRequest' // is not ajax && ! $this->isPrefetch() ) { $session->setPreviousUrl($this->request->fullUrl());