dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d0ab00
)
Throw exception when nothing to clone in CloneDatabase
author
Umherirrender
<umherirrender_de.wp@web.de>
Thu, 23 Aug 2018 19:02:41 +0000
(21:02 +0200)
committer
Aaron Schulz
<aschulz@wikimedia.org>
Fri, 24 Aug 2018 21:28:01 +0000
(21:28 +0000)
Just in case something goes wrong, when calling.
Change-Id: I4490aee6edccf0b185188250948a47b5fd8ba766
includes/db/CloneDatabase.php
patch
|
blob
|
history
diff --git
a/includes/db/CloneDatabase.php
b/includes/db/CloneDatabase.php
index
1564fab
..
5f09555
100644
(file)
--- 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;