php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24920 <license> in changelog overwrites license in getInfoFromString()
Submitted: 2003-08-02 13:14 UTC Modified: 2003-08-04 05:33 UTC
From: greg at chiaraquartet dot net Assigned: cox (profile)
Status: Closed Package: PEAR related
PHP Version: 4.3.2 OS: na
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
7 + 3 = ?
Subscribe to this entry?

 
 [2003-08-02 13:14 UTC] greg at chiaraquartet dot net
Description:
------------
if the last changelog entry has a <license> entry that differs from the release license, PEAR_Common->getInfoFromString() will return the license as the changelog entry rather than the current release license.

Either the DTD should be updated to reflect the validation in PEAR_Common, or PEAR_Common should use this patch to retrieve the license tag in the changelog:

Index: pear/PEAR/Common.php
===================================================================
RCS file: /repository/php-src/pear/PEAR/Common.php,v
retrieving revision 1.93
diff -u -r1.93 Common.php
--- pear/PEAR/Common.php	12 Jul 2003 15:15:38 -0000	1.93
+++ pear/PEAR/Common.php	2 Aug 2003 18:12:54 -0000
@@ -567,7 +578,11 @@
                 }
                 break;
             case 'license':
-                $this->pkginfo['release_license'] = $data;
+                if ($this->in_changelog) {
+                    $this->current_release['release_license'] = $data;
+                } else {
+                    $this->pkginfo['release_license'] = $data;
+                }
                 break;
             case 'dep':
                 if ($data && !$this->in_changelog) {



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-08-04 05:33 UTC] cox@php.net
Thanks Greg, fixed in CVS
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Dec 02 17:03:35 2021 UTC