Guard against broken cache
authorAlexander Ebert <ebert@woltlab.com>
Sat, 9 Jul 2016 20:35:37 +0000 (22:35 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 9 Jul 2016 20:35:37 +0000 (22:35 +0200)
wcfsetup/install/files/lib/system/breadcrumb/Breadcrumbs.class.php

index 6169e515a1127a3e41f1b1cce21e382d2575645d..fecbd71a28997326aea9093b3bac7dfbfd220d53 100644 (file)
@@ -95,7 +95,7 @@ class Breadcrumbs extends SingletonFactory implements \Countable, \Iterator {
                        
                        if ($location['pageID']) {
                                $page = PageCache::getInstance()->getPage($location['pageID']);
-                               while ($page->parentPageID) {
+                               while ($page !== null && $page->parentPageID) {
                                        $page = PageCache::getInstance()->getPage($page->parentPageID);
                                        
                                        array_unshift($locations, [