Hello,
Attached are two phd patches that a) only fetch pear css files when they don't exist yet b) catch when getChildren() for a non-existing id is called. (happens in broken xml) -- Regards/Mit freundlichen Grüßen Christian Weiske -= Geeking around in the name of science since 1982 =-
--- /home/cweiske/Dev/cvs/pear/instpear/share/pear/phd/themes/pear/pearchm.php.orig 2008-10-03 09:15:42.000000000 +0200
+++ /home/cweiske/Dev/cvs/pear/instpear/share/pear/phd/themes/pear/pearchm.php 2008-10-03 09:15:45.000000000 +0200
@@ -195,8 +195,11 @@
$this->hhcStream = fopen($this->chmdir . "pear_manual_{$lang}.hhc", "w");
$this->hhkStream = fopen($this->chmdir . "pear_manual_{$lang}.hhk", "w");
- foreach(array("reset-fonts", "style", "manual") as $name)
+ foreach(array("reset-fonts", "style", "manual") as $name) {
+ if (!file_exists($this->outputdir . "$name.css")) {
file_put_contents($this->outputdir . "$name.css", $this->fetchStylesheet($name));
+ }
+ }
self::headerChm();
}
--- /home/cweiske/Dev/cvs/pear/instpear/share/pear/phd/include/PhDHelper.class.php.orig 2008-10-03 09:13:25.000000000 +0200
+++ /home/cweiske/Dev/cvs/pear/instpear/share/pear/phd/include/PhDHelper.class.php 2008-10-03 09:13:28.000000000 +0200
@@ -21,6 +21,9 @@
($this->IDs[$id]["sdesc"] ? $this->IDs[$id]["sdesc"] : $this->IDs[$id]["ldesc"]);
}
final public function getChildren($id) {
+ if (!array_key_exists($id, $this->IDs)) {
+ return array();
+ }
return $this->IDs[$id]["children"];
}
final public function getParent($id) {
signature.asc
Description: PGP signature
