File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -111,13 +111,17 @@ public static function findMagickBinaryPath(?string $magickBinaryPath): string
111111 $ magickBinaryPath = (new ExecutableFinder ())->find ('magick ' );
112112 }
113113
114+ if (!$ magickBinaryPath ) {
115+ throw new MagickBinaryNotFoundException ($ magickBinaryPath );
116+ }
117+
114118 // Add a proper directory separator at the end if path is not empty.
115119 // If it's empty, then it's set in the global path.
116- if ($ magickBinaryPath && !\is_file ($ magickBinaryPath )) {
120+ if (!\is_file ($ magickBinaryPath )) {
117121 throw new MagickBinaryNotFoundException ($ magickBinaryPath );
118122 }
119123
120- if ($ magickBinaryPath && !\is_executable ($ magickBinaryPath )) {
124+ if (!\is_executable ($ magickBinaryPath )) {
121125 throw new \InvalidArgumentException (\sprintf ('The specified script (%s) is not executable. ' , $ magickBinaryPath ));
122126 }
123127
You can’t perform that action at this time.
0 commit comments