cache: Do not throw on empty set in LinkBatch::constructSet

IDatabase::makeWhereFrom2d no longer returns false (it throws),
so do the check in the calling code and return false

Bug: T336964
Follow-Up: Ifdf3ea54271ea856f2f555a5e087b8f521e348b3
Change-Id: I665c3a6e8d8623ace6a5df4e110527db2f546b30
This commit is contained in:
Umherirrender 2023-05-18 21:32:05 +02:00
parent 6275c76d4a
commit d48115b2bf

View file

@ -362,6 +362,10 @@ class LinkBatch {
* @return string|false String with SQL where clause fragment, or false if no items.
*/
public function constructSet( $prefix, $db ) {
if ( $this->isEmpty() ) {
return false;
}
if ( isset( $this->linksMigration::$prefixToTableMapping[$prefix] ) ) {
[ $blNamespace, $blTitle ] = $this->linksMigration->getTitleFields(
$this->linksMigration::$prefixToTableMapping[$prefix]