BUG Fix cookie errors when running in CLI

This commit is contained in:
Damian Mooyman 2015-07-09 10:46:13 +12:00
parent 0012bc68c4
commit c7bd50427a

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(