diff --git a/src/InputOutput/IHMImpl/Params/IHMInputOutputParamsAbstractClass.php b/src/InputOutput/IHMImpl/Params/IHMInputOutputParamsAbstractClass.php index 8f61e1b..4e6b864 100644 --- a/src/InputOutput/IHMImpl/Params/IHMInputOutputParamsAbstractClass.php +++ b/src/InputOutput/IHMImpl/Params/IHMInputOutputParamsAbstractClass.php @@ -54,7 +54,9 @@ abstract class IHMInputOutputParamsAbstractClass implements InputOutputInterface */ protected function getTask($input) { - return $input->nodeType; + if (isset($input->nodeType)) + return $input->nodeType; + return NULL; } /* diff --git a/src/Request/ParamsRequestImpl/Nodes/NodeClass.php b/src/Request/ParamsRequestImpl/Nodes/NodeClass.php index ba9ebcc..403e421 100644 --- a/src/Request/ParamsRequestImpl/Nodes/NodeClass.php +++ b/src/Request/ParamsRequestImpl/Nodes/NodeClass.php @@ -116,7 +116,7 @@ class NodeClass $xmlNode = $doc->createElement($this->getName()); if ($this->getValue() != "") - $xmlNode->nodeValue = $this->getValue(); + $xmlNode->nodeValue = htmlspecialchars($this->getValue()); foreach ($this->attributes as $key => $value) $xmlNode->setAttribute($key,$value); diff --git a/src/Request/ParamsRequestImpl/ParamsRequestClass.php b/src/Request/ParamsRequestImpl/ParamsRequestClass.php index d8f48ce..0015ccf 100644 --- a/src/Request/ParamsRequestImpl/ParamsRequestClass.php +++ b/src/Request/ParamsRequestImpl/ParamsRequestClass.php @@ -233,9 +233,10 @@ class ParamsRequestClass extends ProcessRequestClass public function run() { $amdaStat = new AmdaStats(IHMConfigClass::getUserName()); - - if (count($this->requestData->getDatasetForStat()) > 0) - $amdaStat->addTask(IHMConfigClass::getUserName(), $this->requestData->getTask(), $this->requestData->getDatasetForStat()); + + $task = $this->requestData->getTask(); + if (isset($task) && (count($this->requestData->getDatasetForStat()) > 0)) + $amdaStat->addTask(IHMConfigClass::getUserName(), $task, $this->requestData->getDatasetForStat()); return parent::run(); } -- libgit2 0.21.2