forked from Public/pics
Replace deprecated trigger_error calls with exceptions
This commit is contained in:
@@ -33,7 +33,7 @@ class EditUser extends HTMLController
|
||||
{
|
||||
// Don't be stupid.
|
||||
if ($current_user->getUserId() == $id_user)
|
||||
trigger_error('Sorry, I cannot allow you to delete yourself.', E_USER_ERROR);
|
||||
throw new Exception('Sorry, I cannot allow you to delete yourself.');
|
||||
|
||||
// So far so good?
|
||||
$user = Member::fromId($id_user);
|
||||
@@ -43,7 +43,7 @@ class EditUser extends HTMLController
|
||||
exit;
|
||||
}
|
||||
else
|
||||
trigger_error('Cannot delete user: an error occured while processing the request.', E_USER_ERROR);
|
||||
throw new Exception('Cannot delete user: an error occured while processing the request.');
|
||||
}
|
||||
// Editing one, then, surely.
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user