Closed bobbingwide closed 4 years ago
The silly thing is that I had the second half of this problem yesterday, before I packaged v3.0.0. I didnt investigate it until I got a problem testing the package from wordpress.org.
There's a TODO in get_trace_file_mask()
we should deal with.
// Ignore the path. @TODO - either ensure it's not set or implement support. //$file_mask .= $this->file_path;
There's also a problem if you don't specify the trace file extension and leave the trace file generation limit blank.
Warning : fopen(C:/apache/htdocs/wordpress/bwtrace3/bwtrace.):
failed to open stream: Permission denied
When validating the file name we need to cater for the path and the extension and when generating the file name we need to do the same.
So now I question the decision to put the generation number after the trace file name.
Wouldn't filename.generation.ext
be better than filename.ext.generation
?
Proposed solution
- Don't enable tracing when the file name's blank.
Default the trace file name to bwtrace.log
If you select the Enabled checkbox but nothing else then you get