X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fdb%2FCloneDatabase.php;h=5f09555e7a6362adbd69845385d519d0fc206215;hb=23edf377dc58a03c2e12703ee48a94a642db6b5f;hp=1564fab225d7d0540077a43aeba37dcb9f10b7e5;hpb=48a72eee8203330657d6ce5daace39e0077666b9;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/db/CloneDatabase.php b/includes/db/CloneDatabase.php index 1564fab225..5f09555e7a 100644 --- a/includes/db/CloneDatabase.php +++ b/includes/db/CloneDatabase.php @@ -52,6 +52,9 @@ class CloneDatabase { public function __construct( IMaintainableDatabase $db, array $tablesToClone, $newTablePrefix, $oldTablePrefix = null, $dropCurrentTables = true ) { + if ( !$tablesToClone ) { + throw new InvalidArgumentException( 'Empty list of tables to clone' ); + } $this->db = $db; $this->tablesToClone = $tablesToClone; $this->newTablePrefix = $newTablePrefix;