Steps to reproduce
1) create an user account
2) make a post, approved
3) Have Admin delete newly created account and select "retain posts" option
4) Have admin/moderator delete the post created in step 2
5) Click Permanently delete this post
6) phpBB database error showing SQL of trying to do user_posts = user_posts - 1 on the user that was deleted
The post was deleted, but the error message showed and error containing SQL code (this should also be hidden by default which could allow someone to learn tables and field names).
After going back to the topic, the post was deleted.
I've done this a few times and sometimes it errors out and sometimes it doesn't. I haven't been able to figure out why some deleted user posts gives this error and why others continue to work.