Modules/Manager: Fix that non-existent modules can be disabled

fixes #9374
This commit is contained in:
Alexander Fuhr 2015-08-04 14:34:30 +02:00
parent 3c35674e14
commit c3fe14a205
1 changed files with 4 additions and 1 deletions

View File

@ -281,7 +281,10 @@ class Manager
public function disableModule($name)
{
if (! $this->hasEnabled($name)) {
return $this;
throw new ConfigurationError(
'Cannot disable module "%s". Module is not installed.',
$name
);
}
if (! is_writable($this->enableDir)) {