Check that provided class implements IStorage in StorageManager::setBackend

- Add notice in admin if setting value change failed
- Add notice in console if setting value change failed
This commit is contained in:
Hypolite Petovan 2019-03-17 19:12:20 -04:00
parent f225a6c51a
commit 7e2e2f425e
3 changed files with 15 additions and 3 deletions

View file

@ -106,7 +106,11 @@ HELP;
return -1;
}
StorageManager::setBackend($class);
if (!StorageManager::setBackend($class)) {
$this->out($class . ' is not a valid backend storage class.');
return -1;
}
return 0;
}