Patch for the bug: http://bugs.php.net/bug.php?id=48953
The method getDescription should return false or ""?
--Moacir
Index: include/PhDHelper.class.php
===================================================================
--- include/PhDHelper.class.php (revision 284228)
+++ include/PhDHelper.class.php (working copy)
@@ -73,6 +73,9 @@
}
final public function getDescription($id, $long = false) {
+ if (!isset($this->IDs[$id])) {
+ return "";
+ }
return $long ?
($this->IDs[$id]["ldesc"] ? $this->IDs[$id]["ldesc"] :
$this->IDs[$id]["sdesc"]) :
($this->IDs[$id]["sdesc"] ? $this->IDs[$id]["sdesc"] :
$this->IDs[$id]["ldesc"]);
@@ -89,7 +92,7 @@
*/
final public function getChildren($id)
{
- return $this->IDs[$id]["children"];
+ return isset($this->IDs[$id]) ? $this->IDs[$id]["children"] : array();
}
/**
@@ -117,7 +120,7 @@
*/
final public function getParent($id)
{
- return $this->IDs[$id]["parent"];
+ return isset($this->IDs[$id]) ? $this->IDs[$id]["parent"] : false;
}
/**