The info page of a page with {{DEFAULTSORT:0}} shows the page title
as default sort value.
Using empty() will consider the string '0' to be false, so use isset() instead.
Bug: T103745
Change-Id: I56ea5a38dcd33e822e0fc5b8685777fe1d212b22
// Display title
$displayTitle = $title->getPrefixedText();
- if ( !empty( $pageProperties['displaytitle'] ) ) {
+ if ( isset( $pageProperties['displaytitle'] ) ) {
$displayTitle = $pageProperties['displaytitle'];
}
// Default sort key
$sortKey = $title->getCategorySortkey();
- if ( !empty( $pageProperties['defaultsort'] ) ) {
+ if ( isset( $pageProperties['defaultsort'] ) ) {
$sortKey = $pageProperties['defaultsort'];
}