From f23877bb9c9871efcf2a487441bc7045b44e1e0b Mon Sep 17 00:00:00 2001 From: River Tarnell Date: Thu, 10 May 2007 15:36:29 +0000 Subject: [PATCH] when $threshold is 0, page_len and page_is_redirect are not present in $s; causes PHP errors and spurious stub display --- includes/Parser.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/Parser.php b/includes/Parser.php index 966b82c3f2..2d053e7a29 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -4074,9 +4074,10 @@ class Parser $linkCache->addGoodLinkObj( $s->page_id, $title ); $this->mOutput->addLink( $title, $s->page_id ); - $colours[$pdbk] = ( $s->page_len >= $threshold || # always true if $threshold <= 0 - $s->page_is_redirect || - !Namespace::isContent( $s->page_namespace ) + $colours[$pdbk] = ( $threshold == 0 || ( + $s->page_len >= $threshold || # always true if $threshold <= 0 + $s->page_is_redirect || + !Namespace::isContent( $s->page_namespace ) ) ? 1 : 2 ); } } -- 2.20.1