mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
commit
903bbd5ae4
@ -73,6 +73,10 @@ class DB {
|
|||||||
* Set it to null to revert to the main database.
|
* Set it to null to revert to the main database.
|
||||||
*/
|
*/
|
||||||
public static function set_alternative_database_name($name = null) {
|
public static function set_alternative_database_name($name = null) {
|
||||||
|
// Skip if CLI
|
||||||
|
if(Director::is_cli()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if($name) {
|
if($name) {
|
||||||
if(!self::valid_alternative_database_name($name)) {
|
if(!self::valid_alternative_database_name($name)) {
|
||||||
throw new InvalidArgumentException(sprintf(
|
throw new InvalidArgumentException(sprintf(
|
||||||
|
Loading…
Reference in New Issue
Block a user