Author values are duplicated to following items whose authors are empty
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3392510. --> Reported by: [dcam](https://www.drupal.org/user/1791830) >>> <p>I was adding test coverage today when I discovered a problem with the new author parsing that was added for <span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/aggregator/-/work_items/3037567" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/aggregator/-/work_items/3037567</a></span>. Here's the sequence of events:</p> <ol> <li>An author is parsed by our reader extension</li> <li>One or more items that follow do not have an author</li> <li>The parsed author from step 1 is set on the items with no author</li> </ol> <p>I found this by adding an assertion for the empty <code>&lt;author&gt;</code> tag item that's in <code>aggregator_test_rss091.xml</code>. The author that should have been empty wasn't. It had the author from several items before it. Once a new author was parsed by our extension, then that replaced the previous one in getting copied to following items.</p> <p>The Laminas reader has an internal cache when parsing items (entries). If a function is called again for the same item, then you don't have to re-query the DOM. But for whatever reason that cache is getting copied from from entry to entry. I don't know why this is happening, but an easy fix is to not write to or read from the cache in our extension.</p>
issue