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

Always return an array from AIOWPSecurity_Utility_File::scan_dir_sort_date() #64

Merged
merged 1 commit into from
Nov 16, 2016

Conversation

chesio
Copy link
Contributor

@chesio chesio commented Nov 14, 2016

This is a minor fix - I noticed that AIOWPSecurity_Utility_File::scan_dir_sort_date() method is only used here, but false return value is not anticipated, therefore I think the method should return an empty array instead to prevent PHP notices.

Also, it's simpler to just asort an array than arsort + array_reverse it.

@Arsenal21 Arsenal21 merged commit c173668 into Arsenal21:master Nov 16, 2016
@chesio chesio deleted the fix-return-value branch November 16, 2016 09:07
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.

2 participants