Skip to content

Commit

Permalink
ImageStorage: Fix support for given storagePath.
Browse files Browse the repository at this point in the history
  • Loading branch information
janbarasek committed Jul 7, 2021
1 parent cf0d681 commit fd8ea98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ImageStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fd8ea98

Please sign in to comment.