svn: /pear/pear-core/tags/PEAR-1.9.3/PEAR/ PackageFile.php
| From: | Helgi Þormar Þorbjörnsson | Date: | Tue, 08 Mar 2011 21:21:40 +0000 |
| Subject: | svn: /pear/pear-core/tags/PEAR-1.9.3/PEAR/ PackageFile.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-9787@lists.php.net to get a copy of this message | ||
dufuz Tue, 08 Mar 2011 21:21:40 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=309037
Log:
Fixed Bug #18349: package.xml version not recognized when single quoted [dufuz]
Bug: http://pear.php.net/bugs/18349 (unknown)
Changed paths:
U pear/pear-core/tags/PEAR-1.9.3/PEAR/PackageFile.php
Modified: pear/pear-core/tags/PEAR-1.9.3/PEAR/PackageFile.php
===================================================================
--- pear/pear-core/tags/PEAR-1.9.3/PEAR/PackageFile.php 2011-03-08 20:06:38 UTC (rev 309036)
+++ pear/pear-core/tags/PEAR-1.9.3/PEAR/PackageFile.php 2011-03-08 21:21:40 UTC (rev 309037)
@@ -186,7 +186,7 @@
*/
function &fromXmlString($data, $state, $file, $archive = false)
{
- if (preg_match('/<package[^>]+version="([0-9]+\.[0-9]+)"/',
$data, $packageversion)) {
+ if
(preg_match('/<package[^>]+version=[\'"]([0-9]+\.[0-9]+)[\'"]/',
$data, $packageversion)) {
if (!in_array($packageversion[1], array('1.0', '2.0',
'2.1'))) {
return PEAR::raiseError('package.xml version "' . $packageversion[1]
.
'" is not supported, only 1.0, 2.0, and 2.1 are supported.');
@@ -232,7 +232,7 @@
}
return $pf;
- } elseif (preg_match('/<package[^>]+version="([^"]+)"/',
$data, $packageversion)) {
+ } elseif
(preg_match('/<package[^>]+version=[\'"]([^"\']+)[\'"]/',
$data, $packageversion)) {
$a = PEAR::raiseError('package.xml file "' . $file .
'" has unsupported package.xml <package> version "' .
$packageversion[1] . '"');
return $a;
@@ -430,7 +430,6 @@
return $ret;
}
-
/**
* Create a PEAR_PackageFile_v* from a .tgz archive or package.xml file.
*