-
Notifications
You must be signed in to change notification settings - Fork 379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allowed a file extension to be inferred for source files without one #47
Conversation
…ave an extension.
@@ -69,7 +69,14 @@ public function find($path) | |||
} | |||
|
|||
if (!$absolutePath) { | |||
throw new NotFoundHttpException(sprintf('Source image not found in "%s"', $absolutePath)); | |||
if(!empty($targetFormat) && is_file($name)) | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please fix CS. curly braces should be on the same line than the control structures (if
, else
...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and there should be a space aka if (
So with the fixed formatting, is it good to go? Or are there some other concerns? |
hmm i think so yes .. been pondering if there is any new security risk, but i guess not. |
if(!empty($targetFormat) && is_file($name)) { | ||
$absolutePath = $name; | ||
} | ||
else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
else
should be on the same line than the closing curly brace
Allowed a file extension to be inferred for source files without one
merged |
When you have a file (e.g.
file/something
) on the file system without a file extension, this PR allows them to be found by looking forfile/something
whenfile/something.png
is used in the url.