X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryLinks.php;h=200fda8864466afbc84fcbff222b966e64b6b2b7;hb=8c30c3704fa144f6d09cd27b127cef507d59d753;hp=508bdf3f9dae38fd2770bb5361bd9c67e57851e7;hpb=128881c1f19a9c5c476822bde821ae898d0c5887;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryLinks.php b/includes/api/ApiQueryLinks.php index 508bdf3f9d..200fda8864 100644 --- a/includes/api/ApiQueryLinks.php +++ b/includes/api/ApiQueryLinks.php @@ -1,9 +1,5 @@ @gmail.com" * * This program is free software; you can redistribute it and/or modify @@ -107,22 +103,22 @@ class ApiQueryLinks extends ApiQueryGeneratorBase { if ( $cond ) { $this->addWhere( $cond ); $multiNS = count( $lb->data ) !== 1; - $multiTitle = count( call_user_func_array( 'array_merge', $lb->data ) ) !== 1; + $multiTitle = count( array_merge( ...$lb->data ) ) !== 1; } else { // No titles so no results return; } } elseif ( $params['namespace'] ) { $this->addWhereFld( $this->prefix . '_namespace', $params['namespace'] ); - $multiNS = count( $params['namespace'] ) !== 1; + $multiNS = $params['namespace'] === null || count( $params['namespace'] ) !== 1; } if ( !is_null( $params['continue'] ) ) { $cont = explode( '|', $params['continue'] ); $this->dieContinueUsageIf( count( $cont ) != 3 ); $op = $params['dir'] == 'descending' ? '<' : '>'; - $plfrom = intval( $cont[0] ); - $plns = intval( $cont[1] ); + $plfrom = (int)$cont[0]; + $plns = (int)$cont[1]; $pltitle = $this->getDB()->addQuotes( $cont[2] ); $this->addWhere( "{$this->prefix}_from $op $plfrom OR " .