Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.0a1

Bug #11654 @static in DocBlock Template can cause PHP Notice
Submitted: 2007-07-20 15:13 UTC Modified: 2009-08-30 06:32 UTC
From: ashnazg Assigned: ashnazg
Status: Closed Package: PhpDocumentor (version 1.4.0RC2)
PHP Version: 5.1.6 OS:
Roadmaps: 1.4.3    
Subscription  



Patch add-validate-on-index Revisions
Revision 2009-07-01 20:50 UTC
Developer mvriel
 
Download patch

Index: ParserDocBlock.inc
===================================================================
RCS file: /repository/pear/PhpDocumentor/phpDocumentor/ParserDocBlock.inc,v
retrieving revision 1.12
diff -u -r1.12 ParserDocBlock.inc
--- ParserDocBlock.inc	19 Apr 2007 20:20:57 -0000	1.12
+++ ParserDocBlock.inc	1 Jul 2009 19:47:07 -0000
@@ -589,7 +589,16 @@
         global $_phpDocumentor_setting;
         if (phpDocumentor_setup::checkIgnoreTag($tag->keyword)) return;
         $value = $tag->value;
-        if (is_array($value)) $value = $value[0];
+        if (is_array($value)) 
+        {
+            if (!empty($value))
+            {
+                $value = $value[0];
+            } else
+            {
+                $value = "";
+            }
+        }
         if ($tag->keyword == 'uses')
         {
             $this->addUses($value, $tag->_description);