Patch Bug 48953

From: Date: Sat, 18 Jul 2009 05:42:47 +0000
Subject: Patch Bug 48953
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969380650@lists.php.net to get a copy of this message
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; } /**
« previous php.doc (#969380650) next »