Commit c4bbe4c3632ab5d0796d96098fd839cbc7a262ae

Authored by Everton Muniz
1 parent 7f9b65d9
Exists in 2.8 and in 6 other branches 2.2, 2.3, 2.4, 2.5, 2.6, 2.7

Trata erro em método que retorna cursos da escola

Showing 1 changed file with 4 additions and 0 deletions   Show diff stats
ieducar/lib/App/Model/IedFinder.php
... ... @@ -129,6 +129,10 @@ class App_Model_IedFinder extends CoreExt_Entity
129 129 $escola_curso->setOrderby('ref_cod_escola ASC, cod_curso ASC');
130 130 $escola_curso = $escola_curso->lista($escolaId);
131 131  
  132 + if (!$escola_curso) {
  133 + return [];
  134 + }
  135 +
132 136 $cursos = [];
133 137  
134 138 foreach ($escola_curso as $key => $val) {
... ...