Closed brlnr23 closed 6 years ago
@brlnr23 Please create an issue here: https://github.com/processwire/processwire-issues
@matjazpotocnik damn... that's when you simply rely on a Google search for the repo ;) Should I delete this issue, or can it be simply ignored? New issue can be found here
Closing this one is enough. Thanks.
Description Calling getLines for any logfile ignores the dateFrom parameter. Although it's set the method returns all existing entries from the logfile
Steps to reproduce 1) check in PW admi interface that "errors" log exists and that it's not empty 2) call $this->log->getLines("errors", array("dateFrom" => time())); 3) check if lines has been returned
Expected For the above call no line from the log should be returned because dateForm is set to now.
Notes I debugged it a bit and figured out, that getLines calls $log-find($limit, $pageNum) but it doesn't pass the options array: https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/core/WireLog.php#L193 getEntries() a few lines below in the same class passes the $options array to the $log->find() method. Adding the options array returns the expected result for me, but maybe there's some more I currently don't see ;)