[ticket/12435] purge_notifications() fails for unused notifications

https://tracker.phpbb.com/browse/PHPBB3-12435

PHPBB3-12435