Merge "Remove duplicate/unnecessary trim"

This commit is contained in:
jenkins-bot 2024-10-10 16:45:07 +00:00 committed by Gerrit Code Review
commit fbc82558e8
2 changed files with 2 additions and 8 deletions

View file

@ -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 () {

View file

@ -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;
}