mirror of
https://github.com/flarum/core.git
synced 2025-10-12 23:44:27 +02:00
Remove superfluous ForbiddenException
It has the same effect as the PermissionDeniedException, so let's just use that. Refs #1641.
This commit is contained in:
@@ -12,8 +12,8 @@
|
||||
namespace Flarum\Extension;
|
||||
|
||||
use Flarum\Extension\Event\Disabling;
|
||||
use Flarum\Http\Exception\ForbiddenException;
|
||||
use Flarum\Settings\SettingsRepositoryInterface;
|
||||
use Flarum\User\Exception\PermissionDeniedException;
|
||||
use Illuminate\Support\Arr;
|
||||
|
||||
class DefaultLanguagePackGuard
|
||||
@@ -38,7 +38,7 @@ class DefaultLanguagePackGuard
|
||||
$locale = Arr::get($event->extension->extra, 'flarum-locale.code');
|
||||
|
||||
if ($locale === $defaultLocale) {
|
||||
throw new ForbiddenException('You cannot disable the default language pack!');
|
||||
throw new PermissionDeniedException('You cannot disable the default language pack!');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user