svn: /pear/pear-core/tags/PEAR-1.9.3/PEAR/PackageFile/ v2.php

[email protected] (Helgi Þormar Þorbjörnsson) Sun, 20 Mar 2011 03:57:02 +0000
Newsgroups php.pear.cvs,php.pear.core
Message-ID <[email protected]>
dufuz                                    Sun, 20 Mar 2011 03:57:02 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=309460

Log:
Fixed Bug #17744: Empty changelog causes fatal error in setChangelogentry [dufuz]

Bug: http://pear.php.net/bugs/17744 (unknown) 
      
Changed paths:
    U   pear/pear-core/tags/PEAR-1.9.3/PEAR/PackageFile/v2.php

Modified: pear/pear-core/tags/PEAR-1.9.3/PEAR/PackageFile/v2.php
===================================================================
--- pear/pear-core/tags/PEAR-1.9.3/PEAR/PackageFile/v2.php	2011-03-20 02:34:51 UTC (rev 309459)
+++ pear/pear-core/tags/PEAR-1.9.3/PEAR/PackageFile/v2.php	2011-03-20 03:57:02 UTC (rev 309460)
@@ -799,6 +799,10 @@
     {
         unset($pinfo['old']);
         unset($pinfo['xsdversion']);
+        // If the changelog isn't an array then it was passed in as an empty tag
+        if (isset($pinfo['changelog']) && !is_array($pinfo['changelog'])) {
+          unset($pinfo['changelog']);
+        }
         $this->_incomplete = false;
         $this->_packageInfo = $pinfo;
     }