pkp/pkp-lib — comment on commit 65a9054d3ea639dda140e580242b120edb03ec4a
File: classes/controllers/grid/citation/PKPCitationGridRow.inc.php line 120
By jerico-dev:

Can you please show me the "many" cases where assertions are used to validate user input or are even posing a security risk? If this is the case then it is a bug. The cases I'm commenting on here are not examples of user input validation nor are they security risks. Assertion are used to document programming assumptions and reveal programming errors that otherwise remain hidden or undocumented and may or may not lead to bugs on execution time. A fatalError is wrong for two reasons: 1) It stops code execution where it may not be necessary 2) It is used to indicate to the (technical) end user that an error condition has occured that can be corrected by system admin or even end user activity.

assertions: reveal errors that need developer action
fatal errors: errors that are due to installation/usage errors and should be corrected by the system admin
errors in the GUI (e.g. form errors): errors that can be corrected by end user action