Skip to content

Commit 46e7aaf

Browse files
committed
Fix potential issue on getting meta title
1 parent 43e195f commit 46e7aaf

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Model/Author.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function getMetaTitle()
9595
$title = $this->getTitle();
9696
}
9797

98-
return trim($title);
98+
return trim($title ?: '');
9999
}
100100

101101
/**

Model/Category.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ public function getMetaTitle()
384384
$title = $this->getData('title');
385385
}
386386

387-
return trim($title);
387+
return trim($title ?: '');
388388
}
389389

390390
/**

Model/Tag.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public function getMetaTitle()
177177
$title = $this->getData('title');
178178
}
179179

180-
return trim($title);
180+
return trim($title ?: '');
181181
}
182182

183183
/**

0 commit comments

Comments
 (0)