Commit f7093283b2e9384765f9a77c1b548c352a1939e3
1 parent
fa791617
Exists in
master
and in
66 other branches
Fix pb with PHP v.5.3
Showing
4 changed files
with
20 additions
and
11 deletions
Show diff stats
src/InputOutput/IHMImpl/ParamInfo/IHMInputOutputParamInfoClass.php
@@ -93,7 +93,8 @@ class IHMInputOutputParamInfoClass implements InputOutputInterface | @@ -93,7 +93,8 @@ class IHMInputOutputParamInfoClass implements InputOutputInterface | ||
93 | if (($data->getResult() != NULL) && ($data->getResult()->getName() == "plot") && (count($data->getResult()->getChildren()) >= 1)) { | 93 | if (($data->getResult() != NULL) && ($data->getResult()->getName() == "plot") && (count($data->getResult()->getChildren()) >= 1)) { |
94 | $result_data = array(); | 94 | $result_data = array(); |
95 | 95 | ||
96 | - $panelNode = $data->getResult()->getChildren()[0]; | 96 | + $panelNodes = $data->getResult()->getChildren(); |
97 | + $panelNode = $panelNodes[0]; | ||
97 | 98 | ||
98 | $plotNode = NULL; | 99 | $plotNode = NULL; |
99 | if (count($panelNode->getChildren()) >= 1) { | 100 | if (count($panelNode->getChildren()) >= 1) { |
@@ -234,14 +235,17 @@ class IHMInputOutputParamInfoClass implements InputOutputInterface | @@ -234,14 +235,17 @@ class IHMInputOutputParamInfoClass implements InputOutputInterface | ||
234 | if (!isset($drawNode)) | 235 | if (!isset($drawNode)) |
235 | return; | 236 | return; |
236 | 237 | ||
237 | - if (!empty($drawNode->getAttribute(REQUESTOUTPUTPLOTSPECTRO_YAXIS))) | ||
238 | - $result_array['spectro-yaxis'] = $drawNode->getAttribute(REQUESTOUTPUTPLOTSPECTRO_YAXIS); | 238 | + $yAxis = $drawNode->getAttribute(REQUESTOUTPUTPLOTSPECTRO_YAXIS); |
239 | + if (!empty($yAxis)) | ||
240 | + $result_array['spectro-yaxis'] = $yAxis; | ||
239 | 241 | ||
240 | - if (!empty($drawNode->getAttribute(REQUESTOUTPUTPLOTSPECTRO_MIN))) | ||
241 | - $result_array['spectro-value-min'] = $drawNode->getAttribute(REQUESTOUTPUTPLOTSPECTRO_MIN); | 242 | + $min = $drawNode->getAttribute(REQUESTOUTPUTPLOTSPECTRO_MIN); |
243 | + if (!empty($min)) | ||
244 | + $result_array['spectro-value-min'] = $min; | ||
242 | 245 | ||
243 | - if (!empty($drawNode->getAttribute(REQUESTOUTPUTPLOTSPECTRO_MAX))) | ||
244 | - $result_array['spectro-value-max'] = $drawNode->getAttribute(REQUESTOUTPUTPLOTSPECTRO_MAX); | 246 | + $max = $drawNode->getAttribute(REQUESTOUTPUTPLOTSPECTRO_MAX); |
247 | + if (!empty($max)) | ||
248 | + $result_array['spectro-value-max'] = $max; | ||
245 | } | 249 | } |
246 | 250 | ||
247 | private function unmarshallAdditionalObjectsData($plotNode) { | 251 | private function unmarshallAdditionalObjectsData($plotNode) { |
@@ -299,7 +303,8 @@ class IHMInputOutputParamInfoClass implements InputOutputInterface | @@ -299,7 +303,8 @@ class IHMInputOutputParamInfoClass implements InputOutputInterface | ||
299 | $this->unmarshallSymbolData($drawNode->getSymbol(), "serie-symbols-", $result_array); | 303 | $this->unmarshallSymbolData($drawNode->getSymbol(), "serie-symbols-", $result_array); |
300 | } | 304 | } |
301 | 305 | ||
302 | - if (!empty($drawNode->getColorSerieId())) { | 306 | + $colorSerieId = $drawNode->getColorSerieId(); |
307 | + if (!empty($colorSerieId)) { | ||
303 | //ToDo | 308 | //ToDo |
304 | } | 309 | } |
305 | 310 |
src/InputOutput/IHMImpl/Params/IHMInputOutputParamsAbstractClass.php
@@ -54,7 +54,8 @@ abstract class IHMInputOutputParamsAbstractClass implements InputOutputInterface | @@ -54,7 +54,8 @@ abstract class IHMInputOutputParamsAbstractClass implements InputOutputInterface | ||
54 | */ | 54 | */ |
55 | protected function unmarshallTimeDefinition($input, $requestIndex, $ttFileIndex = -1, $ttIntIndex = -1) | 55 | protected function unmarshallTimeDefinition($input, $requestIndex, $ttFileIndex = -1, $ttIntIndex = -1) |
56 | { | 56 | { |
57 | - $timesNode = $this->paramsData->getRequestNodes()[$requestIndex]->getTimesNode(); | 57 | + $requestNodes = $this->paramsData->getRequestNodes(); |
58 | + $timesNode = $requestNodes[$requestIndex]->getTimesNode(); | ||
58 | 59 | ||
59 | switch ($input->timesrc) | 60 | switch ($input->timesrc) |
60 | { | 61 | { |
src/Request/ParamsRequestImpl/Nodes/Params/ParamNodeClass.php
@@ -101,8 +101,10 @@ class ParamNodeClass extends NodeClass | @@ -101,8 +101,10 @@ class ParamNodeClass extends NodeClass | ||
101 | $getNode = $this->getChildInstanceByName(PARAM_GET, false); | 101 | $getNode = $this->getChildInstanceByName(PARAM_GET, false); |
102 | if (!$getNode) | 102 | if (!$getNode) |
103 | return NULL; | 103 | return NULL; |
104 | - if (count($getNode->getChildren()) > 0) | ||
105 | - return $getNode->getChildren()[0]; | 104 | + if (count($getNode->getChildren()) > 0) { |
105 | + $getNodes = $getNode->getChildren(); | ||
106 | + return $getNodes[0]; | ||
107 | + } | ||
106 | return NULL; | 108 | return NULL; |
107 | } | 109 | } |
108 | 110 |
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotPanelNodeClass.php
@@ -6,6 +6,7 @@ require_once("RequestOutputPlotElementStatusNodeClass.php"); | @@ -6,6 +6,7 @@ require_once("RequestOutputPlotElementStatusNodeClass.php"); | ||
6 | require_once("RequestOutputPlotElementTickNodeClass.php"); | 6 | require_once("RequestOutputPlotElementTickNodeClass.php"); |
7 | require_once "RequestOutputPlotElementEpochNodeClass.php"; | 7 | require_once "RequestOutputPlotElementEpochNodeClass.php"; |
8 | require_once "RequestOutputPlotElementInstantNodeClass.php"; | 8 | require_once "RequestOutputPlotElementInstantNodeClass.php"; |
9 | +require_once "RequestOutputPlotFontNodeClass.php"; | ||
9 | 10 | ||
10 | define ("REQUESTOUTPUTPLOTPANEL_NAME", "panel"); | 11 | define ("REQUESTOUTPUTPLOTPANEL_NAME", "panel"); |
11 | define ("REQUESTOUTPUTPLOTPANEL_TITLE", "title"); | 12 | define ("REQUESTOUTPUTPLOTPANEL_TITLE", "title"); |