Skip to content

Update laravel/file.php #1356

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

Merged
merged 2 commits into from
Oct 25, 2012
Merged

Update laravel/file.php #1356

merged 2 commits into from
Oct 25, 2012

Conversation

helmut
Copy link
Contributor

@helmut helmut commented Oct 16, 2012

Fixed bug that was causing the latest function to return the 'last' file rather than the actual 'latest' file.

Fixed bug that was causing the latest function to return the 'last' file rather than the actual 'latest' file.
@jasonlewis
Copy link
Contributor

Can I also suggest that you define $latest before the foreach() so that it has a default null value before looping. If there are no files within the directory then it might throw errors.

Yep... good pick up jason.
taylorotwell added a commit that referenced this pull request Oct 25, 2012
@taylorotwell taylorotwell merged commit 205cc48 into laravel:develop Oct 25, 2012
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.

3 participants