in2code-de / in2publish_core

in2publish Community Version
https://www.in2code.de/produkte/content-publisher/
GNU General Public License v3.0
40 stars 23 forks source link

Error in FileEdgeCacheInvalidationService class #89

Closed lukasra92 closed 2 years ago

lukasra92 commented 2 years ago

These lines of code lead to an error:

while ($page = $statement->fetch()) {
    $recordCollection->addRecord('pages', $page);
}

Error message is:

(1/1) TypeError Argument 2 passed to In2code\In2publishCore\Features\FileEdgeCacheInvalidator\Domain\Service\RecordCollection::addRecord() must be of the type int, array given [...]

The reason is that addRecord() expects an int as 2nd parameter, but fetch() returns an array if no Fetch Mode is given.