Commit e79a8d8a39e240b48d163d3778d3513683791b04
1 parent
82dbf88c
Exists in
master
and in
21 other branches
Ajuste
Showing
1 changed file
with
5 additions
and
5 deletions
Show diff stats
rn/ProcessoEletronicoRN.php
... | ... | @@ -269,15 +269,15 @@ class ProcessoEletronicoRN extends InfraRN { |
269 | 269 | $objEstrutura->sigla = utf8_decode($objEstrutura->sigla); |
270 | 270 | |
271 | 271 | if ($bolRetornoRaw !== false) { |
272 | - | |
273 | 272 | if (isset($objEstrutura->hierarquia) && isset($objEstrutura->hierarquia->nivel)) { |
274 | - | |
273 | + if (!is_array($objEstrutura->hierarquia->nivel)) { | |
274 | + $objEstrutura->hierarquia->nivel = array($objEstrutura->hierarquia->nivel); | |
275 | + } | |
276 | + | |
275 | 277 | $objEstrutura->hierarquia->nivel = (array) $objEstrutura->hierarquia->nivel; |
276 | - | |
277 | 278 | foreach ($objEstrutura->hierarquia->nivel as &$objNivel) { |
278 | - | |
279 | 279 | $objNivel->nome = utf8_decode($objNivel->nome); |
280 | - } | |
280 | + } | |
281 | 281 | } |
282 | 282 | return $objEstrutura; |
283 | 283 | } | ... | ... |