#24920 [Asn->Csd]: <license> in changelog overwrites license in getInfoFromString()

From: Date: Mon, 04 Aug 2003 10:33:05 +0000
Subject: #24920 [Asn->Csd]: <license> in changelog overwrites license in getInfoFromString()
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-19239@lists.php.net to get a copy of this message
ID: 24920 Updated by: cox@php.net Reported By: greg at chiaraquartet dot net -Status: Assigned +Status: Closed Bug Type: PEAR related Operating System: na PHP Version: 4.3.2 Assigned To: cox New Comment: Thanks Greg, fixed in CVS Previous Comments: ------------------------------------------------------------------------ [2003-08-02 13:14:17] 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) { ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24920&edit=1

« previous php.pear.dev (#19239) next »