mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-15 03:35:01 +00:00
fix ::getTruncatedSectionTitle() return type
This method can return false if getParsedSectionTitle() returns false Both Language::embedBidi and Language::truncateForVisual return non-string primitives unchanged if they're passed to them as first argument. Ideally the Language methods arguments should be string-typed but I am not sure how easy that change would be now, so better to document the possibility here. Change-Id: I7e2856862d6508ecd1aa57ad99b92942bc4d7bed
This commit is contained in:
parent
a76cc44a60
commit
0a677f4675
|
@ -127,7 +127,7 @@ class EchoPresentationModelSection {
|
|||
/**
|
||||
* Get truncated section title, according to user's language.
|
||||
* You should only call this if EchoPresentationModelSection::exists returns true.
|
||||
* @return string
|
||||
* @return string|false
|
||||
*/
|
||||
public function getTruncatedSectionTitle() {
|
||||
return $this->language->embedBidi( $this->language->truncateForVisual(
|
||||
|
|
Loading…
Reference in a new issue