diff --git a/model/DB.php b/model/DB.php index 5f215a679..e1888fdc3 100644 --- a/model/DB.php +++ b/model/DB.php @@ -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(