Merge pull request #4386 from tractorcow/pulls/3.1/fix-cli-errors

BUG Fix cookie errors when running in CLI
This commit is contained in:
Loz Calver 2015-07-14 09:48:39 +01:00
commit 903bbd5ae4

View File

@ -73,6 +73,10 @@ class DB {
* Set it to null to revert to the main database.
*/
public static function set_alternative_database_name($name = null) {
// Skip if CLI
if(Director::is_cli()) {
return;
}
if($name) {
if(!self::valid_alternative_database_name($name)) {
throw new InvalidArgumentException(sprintf(