summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGábor Hojtsy2011-11-23 10:08:09 (GMT)
committer Gábor Hojtsy2011-11-23 10:08:09 (GMT)
commitc8377ddf2df4cfbaa5ee871f421ecfc68f62164f (patch)
tree4432145bef9d8a018214d97fddfe11c5c9d8bc15
parent51aa7c6445f7791b7150ebe4a7d07d9835dace64 (diff)
Issue #1006938 by dww, westwesterson: avoid PHP warnings in the PHP 4 XML parser caused by the relatively new XML data pieces produced at updates.drupal.org
-rw-r--r--modules/update/update.fetch.inc14
1 files changed, 13 insertions, 1 deletions
diff --git a/modules/update/update.fetch.inc b/modules/update/update.fetch.inc
index 5cf70f3..d1e3812 100644
--- a/modules/update/update.fetch.inc
+++ b/modules/update/update.fetch.inc
@@ -221,6 +221,11 @@ class update_xml_parser {
$this->current_term = array();
$this->current_object = &$this->current_term;
break;
+ case 'FILE':
+ unset($this->current_object);
+ $this->current_file = array();
+ $this->current_object = &$this->current_file;
+ break;
}
}
@@ -252,6 +257,13 @@ class update_xml_parser {
case 'TERMS':
$this->current_object = &$this->current_release;
break;
+ case 'FILE':
+ unset($this->current_object);
+ $this->current_release['files'][] = $this->current_file;
+ break;
+ case 'FILES':
+ $this->current_object = &$this->current_release;
+ break;
default:
$this->current_object[strtolower($this->current_tag)] = trim($this->current_object[strtolower($this->current_tag)]);
$this->current_tag = '';
@@ -259,7 +271,7 @@ class update_xml_parser {
}
function data($parser, $data) {
- if ($this->current_tag && !in_array($this->current_tag, array('PROJECT', 'RELEASE', 'RELEASES', 'TERM', 'TERMS'))) {
+ if ($this->current_tag && !in_array($this->current_tag, array('PROJECT', 'RELEASE', 'RELEASES', 'TERM', 'TERMS', 'FILE', 'FILES'))) {
$tag = strtolower($this->current_tag);
if (isset($this->current_object[$tag])) {
$this->current_object[$tag] .= $data;