-
Notifications
You must be signed in to change notification settings - Fork 30
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This already does rewind on creating from class, and calling next() once - so it should be on the latest line already:
$this->logIteratorFactory->getLogIterator($this->settingsService->getShownLevels()); ... new LogIterator($handle, $dateFormat, $timezone); ... __construct($handle, string $dateFormat, string $timezone) { ... $this->rewind(); ... $this->next();
What does it fix? I remember investigating something with it, but didn't finish. But not sure that current code brings something to it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before the fix I always got null has return from getLastItem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is something weird going on because I agree with @Antreesy the code is supposed to return a rewinded iterator already from the factory
f27d729 to
92d2bd5
Compare
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
92d2bd5 to
b655aac
Compare
🤖 AI (if applicable)