Catch excpt to avoid fatal in Message::__toString
[lhc/web/wiklou.git] / includes / CategoryPage.php
index d7f78ec..3e69dd4 100644 (file)
@@ -21,9 +21,6 @@
  * @file
  */
 
-if ( !defined( 'MEDIAWIKI' ) )
-       die( 1 );
-
 /**
  * Special handling for category description pages, showing pages,
  * subcategories and file that belong to the category
@@ -59,7 +56,7 @@ class CategoryPage extends Article {
                $diffOnly = $request->getBool( 'diffonly',
                        $this->getContext()->getUser()->getOption( 'diffonly' ) );
 
-               if ( isset( $diff ) && $diffOnly ) {
+               if ( $diff !== null && $diffOnly ) {
                        parent::view();
                        return;
                }