mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CategoryTree
synced 2024-11-27 09:43:06 +00:00
Merge "Remove duplicate/unnecessary trim"
This commit is contained in:
commit
fbc82558e8
|
@ -147,7 +147,7 @@ class ApiCategoryTree extends ApiBase {
|
|||
),
|
||||
$this->wanCache::TTL_DAY,
|
||||
static function () use ( $ct, $title, $depth ) {
|
||||
return trim( $ct->renderChildren( $title, $depth ) );
|
||||
return $ct->renderChildren( $title, $depth );
|
||||
},
|
||||
[
|
||||
'touchedCallback' => function () {
|
||||
|
|
|
@ -81,14 +81,8 @@ class CategoryTree {
|
|||
public function getTag( string $category, bool $hideroot = false, array $attr = [],
|
||||
int $depth = 1
|
||||
) {
|
||||
$category = trim( $category );
|
||||
if ( $category === '' ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$title = self::makeTitle( $category );
|
||||
|
||||
if ( $title === null ) {
|
||||
if ( !$title ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue