Page handler failed to validate object existence
authorAlexander Ebert <ebert@woltlab.com>
Wed, 15 Mar 2017 11:57:49 +0000 (12:57 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 15 Mar 2017 11:57:49 +0000 (12:57 +0100)
wcfsetup/install/files/lib/system/page/handler/ArticlePageHandler.class.php

index b35f70c2440d16c152257a88d5e2c8c7f610dc35..29c95c245851eda74a60aece8a5e5cca5b63b1c8 100644 (file)
@@ -37,7 +37,9 @@ class ArticlePageHandler extends AbstractLookupPageHandler implements IOnlineLoc
         * @inheritDoc
         */
        public function isVisible($objectID = null) {
-               return ViewableArticleRuntimeCache::getInstance()->getObject($objectID)->canRead();
+               $article = ViewableArticleRuntimeCache::getInstance()->getObject($objectID);
+               
+               return ($article !== null && $article->canRead());
        }
        
        /**