IAlex has uploaded a new change for review. https://gerrit.wikimedia.org/r/70423
Change subject: (bug 50078) Allow a string other than '*' as condition for DatabaseBase::delete() ...................................................................... (bug 50078) Allow a string other than '*' as condition for DatabaseBase::delete() Currently, either '*' is given as condition meaning "everything" or an array must be passed since DatabaseBase::makeList() requires an array. Now the parameter is consistent with one of other similar methods, since a string will be handled correctly. Bug: 50078 Change-Id: Id5a8220d21245669f1091a3b5ed1def65b22d375 --- M includes/db/Database.php 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/23/70423/1 diff --git a/includes/db/Database.php b/includes/db/Database.php index 4b2eae7..e06d80d 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -2712,7 +2712,10 @@ $sql = "DELETE FROM $table"; if ( $conds != '*' ) { - $sql .= ' WHERE ' . $this->makeList( $conds, LIST_AND ); + if ( is_array( $conds ) ) { + $conds = $this->makeList( $conds, LIST_AND ); + } + $sql .= ' WHERE ' . $conds; } return $this->query( $sql, $fname ); -- To view, visit https://gerrit.wikimedia.org/r/70423 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id5a8220d21245669f1091a3b5ed1def65b22d375 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: IAlex <coderev...@emsenhuber.ch> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits