From fd8ea98c18892e2c15db74ce0e52ed348c969c12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Bar=C3=A1=C5=A1ek?= Date: Wed, 7 Jul 2021 10:33:40 +0200 Subject: [PATCH] ImageStorage: Fix support for given storagePath. --- src/ImageStorage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ImageStorage.php b/src/ImageStorage.php index aec33e3..3785789 100644 --- a/src/ImageStorage.php +++ b/src/ImageStorage.php @@ -25,7 +25,7 @@ public function __construct(?string $storagePath = null, string $relativeStorage } if ($storagePath === null && isset($_SERVER['SCRIPT_FILENAME'])) { $storagePath = dirname((string) $_SERVER['SCRIPT_FILENAME']) . DIRECTORY_SEPARATOR . $relativeStoragePath; - } else { + } elseif ($storagePath === null) { throw new \RuntimeException('Script filename is not available. Please define storagePath manually.'); } $this->storagePath = $storagePath;