diff --git a/phpdotnet/phd/Package/PHP/Web.php b/phpdotnet/phd/Package/PHP/Web.php index ad36b7cf..0489113c 100644 --- a/phpdotnet/phd/Package/PHP/Web.php +++ b/phpdotnet/phd/Package/PHP/Web.php @@ -204,7 +204,14 @@ public function header($id) { "alternatives" => $this->cchunk["alternatives"], "source" => $this->sourceInfo($id), ); - $setup["history"] = $this->history[$setup["source"]["path"]] ?? []; + $history = $this->history ?? []; + + $sourcePath = $setup["source"]["path"] ?? null; + + $setup["history"] = $sourcePath !== null + ? ($history[$sourcePath] ?? []) + : []; + if ($this->getChildren($id)) { $lang = $this->config->language; $setup["extra_header_links"] = array(