mirror of
https://github.com/php/php-src.git
synced 2025-08-19 17:04:47 +02:00
ensure correct package names and versions in the xml parser
This commit is contained in:
parent
ed2bff2a7f
commit
2816eafc06
1 changed files with 2 additions and 1 deletions
|
@ -262,7 +262,7 @@ class PEAR_Common extends PEAR
|
|||
case 'name':
|
||||
switch ($this->prev_element) {
|
||||
case 'package':
|
||||
$this->pkginfo['package'] = $data;
|
||||
$this->pkginfo['package'] = ereg_replace('[^a-zA-Z0-9._]', '_', trim($data));
|
||||
break;
|
||||
case 'maintainer':
|
||||
$this->current_maintainer['name'] = $data;
|
||||
|
@ -286,6 +286,7 @@ class PEAR_Common extends PEAR
|
|||
}
|
||||
break;
|
||||
case 'version':
|
||||
$data = ereg_replace ('[^a-zA-Z0-9._\-]', '_', trim($data));
|
||||
if ($this->in_changelog) {
|
||||
$this->current_release['version'] = $data;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue