forked from Public/pics
Replace deprecated trigger_error calls with exceptions
This commit is contained in:
@@ -41,13 +41,13 @@ class EditAlbum extends HTMLController
|
||||
exit;
|
||||
}
|
||||
else
|
||||
trigger_error('Cannot delete album: an error occured while processing the request.', E_USER_ERROR);
|
||||
throw new Exception('Cannot delete album: an error occured while processing the request.');
|
||||
}
|
||||
// Editing one, then, surely.
|
||||
else
|
||||
{
|
||||
if ($album->kind !== 'Album')
|
||||
trigger_error('Cannot edit album: not an album.', E_USER_ERROR);
|
||||
throw new Exception('Cannot edit album: not an album.');
|
||||
|
||||
parent::__construct('Edit album \'' . $album->tag . '\'');
|
||||
$form_title = 'Edit album \'' . $album->tag . '\'';
|
||||
|
||||
Reference in New Issue
Block a user