Index: trunk/extensions/Translate/tag/TranslatablePage.php |
— | — | @@ -220,6 +220,7 @@ |
221 | 221 | return $this->getTag( 'tp:tag' ); |
222 | 222 | } |
223 | 223 | |
| 224 | + // Returns false if not found |
224 | 225 | protected function getTag( $tag, $dbt = DB_SLAVE ) { |
225 | 226 | $db = wfGetDB( $dbt ); |
226 | 227 | |
— | — | @@ -378,7 +379,7 @@ |
379 | 380 | $page = TranslatablePage::newFromTitle( |
380 | 381 | self::changeTitleText( $title, $title->getBaseText() ) ); |
381 | 382 | |
382 | | - if ( $page->getMarkedTag() === null ) return false; |
| 383 | + if ( $page->getMarkedTag() === false ) return false; |
383 | 384 | return $page; |
384 | 385 | } |
385 | 386 | |
Index: trunk/extensions/Translate/tag/PageTranslationHooks.php |
— | — | @@ -382,7 +382,8 @@ |
383 | 383 | |
384 | 384 | // Get the translation percentage |
385 | 385 | $pers = $page->getTranslationPercentages(); |
386 | | - $per = $pers[$title->getSubpageText()] * 100; |
| 386 | + $per = @$pers[$title->getSubpageText()]; |
| 387 | + $per = ($per === null) ? 0 : $per * 100; |
387 | 388 | $titleText = $page->getTitle()->getText(); |
388 | 389 | $url = $page->getTranslationUrl( $title->getSubpageText() ); |
389 | 390 | |