ryancramerdesign / ProcessWire

Our repository has moved to https://github.com/processwire – please head there for the latest version.
https://processwire.com
Other
727 stars 201 forks source link

getLines for a logfile ignores dateFrom option #2067

Closed brlnr23 closed 6 years ago

brlnr23 commented 6 years ago

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 ;)

matjazpotocnik commented 6 years ago

@brlnr23 Please create an issue here: https://github.com/processwire/processwire-issues

brlnr23 commented 6 years ago

@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

matjazpotocnik commented 6 years ago

Closing this one is enough. Thanks.