diff --git a/phpdotnet/phd/Package/PHP/Web.php b/phpdotnet/phd/Package/PHP/Web.php index 2ba5401..475f387 100644 --- a/phpdotnet/phd/Package/PHP/Web.php +++ b/phpdotnet/phd/Package/PHP/Web.php @@ -204,7 +204,14 @@ $PARENTS = ' . var_export($parents, true) . ';'; "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(