Permalink
Browse files

# [#29646] Some errors on Updater. Thanks Mark.

  • Loading branch information...
1 parent 264eb8a commit d1be1e5b59cb6ca94331d5c6e451fdfee612e1ce @dextercowley dextercowley committed with infograf768 Nov 13, 2012
@@ -30,6 +30,7 @@ $ -> Language fix or change
#$ [#29669] Consistent form validation notifications. Thanks Roland
# [#29675] *Protostar error page tries to load search module even when module is not published
$ [#29668] language installer coordinator team URL must changed j3 TT. Thanks Chalak
+ # [#29646] Some errors on Updater. Thanks Mark.
11-Nov-2012 Jean-Marie Simonet
# [#29569] *Implementing accordeons for Modules Options
@@ -97,7 +97,11 @@ public function _startElement($parser, $name, $attrs = array())
$tag = $this->_getStackLocation();
// Reset the data
- eval('$this->' . $tag . '->_data = "";');
+ if (isset($this->$tag))
+ {
+ $this->$tag->_data = "";
+ }
+
switch ($name)
{
case 'CATEGORY':
@@ -36,7 +36,10 @@ protected function _startElement($parser, $name, $attrs = array())
$tag = $this->_getStackLocation();
// Reset the data
- eval('$this->' . $tag . '->_data = "";');
+ if (isset($this->$tag))
+ {
+ $this->$tag->_data = "";
+ }
switch ($name)
{
@@ -180,7 +180,10 @@ public function _startElement($parser, $name, $attrs = array())
$tag = $this->_getStackLocation();
// Reset the data
- eval('$this->' . $tag . '->_data = "";');
+ if (isset($this->$tag))
+ {
+ $this->$tag->_data = "";
+ }
switch ($name)
{
@@ -196,10 +199,17 @@ public function _startElement($parser, $name, $attrs = array())
// For everything else there's...the default!
default:
$name = strtolower($name);
- $this->currentUpdate->$name->_data = '';
+ if (isset($this->currentUpdate->$name))
+ {
+ $this->currentUpdate->$name->_data = '';
+ }
foreach ($attrs as $key => $data)
{
$key = strtolower($key);
+ if (!isset($this->currentUpdate->$name))
+ {
+ $this->currentUpdate->$name = new stdClass();
+ }
$this->currentUpdate->$name->$key = $data;
}
break;
@@ -227,7 +237,8 @@ public function _endElement($parser, $name)
$ver = new JVersion;
$product = strtolower(JFilterInput::getInstance()->clean($ver->PRODUCT, 'cmd'));
// Check for optional min_dev_level and max_dev_level attributes to further specify targetplatform (e.g., 3.0.1)
- if ($product == $this->currentUpdate->targetplatform->name
+ if (isset($this->currentUpdate->targetplatform->name)
+ && $product == $this->currentUpdate->targetplatform->name
&& preg_match('/' . $this->currentUpdate->targetplatform->version . '/', $ver->RELEASE)
&& ((!isset($this->currentUpdate->targetplatform->min_dev_level)) || $ver->DEV_LEVEL >= $this->currentUpdate->targetplatform->min_dev_level)
&& ((!isset($this->currentUpdate->targetplatform->max_dev_level)) || $ver->DEV_LEVEL <= $this->currentUpdate->targetplatform->max_dev_level))
@@ -285,7 +296,10 @@ public function _characterData($parser, $data)
// Throw the data for this item together
$tag = strtolower($tag);
- $this->currentUpdate->$tag->_data .= $data;
+ if (isset($this->currentUpdate->$tag))
+ {
+ $this->currentUpdate->$tag->_data .= $data;
+ }
}
/**

0 comments on commit d1be1e5

Please sign in to comment.