joomla/joomla-cms — pull request #3295 by itbra (2014-03-13 17:17:17+00:00)
Title: fix JTable::delete()

The model's delete-function evalutes whether the table has loaded a row or not. If an error occurs while the table loads a row and populates its state, an exception will be thrown, whereas when no error occurs while trying to load and the result is empty, the table simply returns false. The model assumes that when table->load() is not true, the table can serve an error, but this is not the case. So the user remains unexplained why deletion fails. The fix is to check whether there is an error available from the table and set it within the model or to set a generic error message telling the user that *The database row is empty.*.