Fix: [ bug #1534 ] Unknown error when deleting a product photo under
special circumstances