[ticket/12517] Correctly call $log->add in prune shadow topics

PHPBB3-12517
Merge pull request #2438 from marc1706/ticket/12517

[ticket/12517] Correctly call $log->add in prune shadow topics

* marc1706/ticket/12517:
  [ticket/12517] Correctly call $log->add in prune shadow topics