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.
These lines of code lead to an error:
Error message is:
The reason is that addRecord() expects an int as 2nd parameter, but fetch() returns an array if no Fetch Mode is given.