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

If filename is provided, we should check if an extension is provided in the filename #50

Closed
onno-vos-dev opened this issue Apr 9, 2015 · 2 comments

Comments

@onno-vos-dev
Copy link
Contributor

Currently on Line 124 of Logger.php we check if the filename is provided. If so, we accept the filename as is without adding or checking for an extension.

if ($this->options['filename']) {
                $this->logFilePath = $logDirectory.DIRECTORY_SEPARATOR.$this->options['filename'];
            }

I suggest we do an additional check if the extension is provided as well. If not, the default logfile name should be chosen instead. This to prevent users from being able to add a filename and "expecting the default logextension" to be added to this but instead receive a filename without extension which could be problematic.

@onno-vos-dev
Copy link
Contributor Author

@katzgrau I can submit a PR on the weekend for this so you can leave this for me.

@katzgrau
Copy link
Owner

Thanks! Will hit this up tomorrow AM

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

No branches or pull requests

2 participants