Skip to content
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

Merged
merged 3 commits into from
Jan 30, 2012

Conversation

web-dev
Copy link

@web-dev web-dev commented Jan 17, 2012

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 for file/something when file/something.png is used in the url.

@@ -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))
{
Copy link
Contributor

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...)

Copy link
Contributor

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 (

@web-dev
Copy link
Author

web-dev commented Jan 23, 2012

So with the fixed formatting, is it good to go? Or are there some other concerns?

@lsmith77
Copy link
Contributor

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 {
Copy link
Contributor

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

lsmith77 added a commit that referenced this pull request Jan 30, 2012
Allowed a file extension to be inferred for source files without one
@lsmith77 lsmith77 merged commit b47dc2b into liip:master Jan 30, 2012
@lsmith77
Copy link
Contributor

merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants