Commit 73c1f50b0704b60c908c53dbd67805dea3247054
Committed by
GitHub
Exists in
2.9
and in
2 other branches
Merge pull request #8953 from portabilis/honeybadger_p57201_faults_86394775
Resolver erro ao fazer soma com string vazia
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
ieducar/modules/HistoricoEscolar/Views/ProcessamentoApiController.php
... | ... | @@ -785,6 +785,7 @@ class ProcessamentoApiController extends Core_Controller_Page_EditController |
785 | 785 | } |
786 | 786 | |
787 | 787 | $arrayAreaConhecimento[$componenteCurricular->area_conhecimento->id]['nota_conceitual_numerica'] ??= 0 ; |
788 | + $arrayAreaConhecimento[$componenteCurricular->area_conhecimento->id]['falta'] ??= 0; | |
788 | 789 | |
789 | 790 | $arrayAreaConhecimento[$componenteCurricular->area_conhecimento->id]['nota'] += $nota; |
790 | 791 | $arrayAreaConhecimento[$componenteCurricular->area_conhecimento->id]['nota_conceitual_numerica'] += is_numeric($notaConceitualNumerica) ? $notaConceitualNumerica : 0; |
... | ... | @@ -906,7 +907,7 @@ class ProcessamentoApiController extends Core_Controller_Page_EditController |
906 | 907 | $falta = $this->getRequest()->faltas; |
907 | 908 | } |
908 | 909 | |
909 | - return $falta; | |
910 | + return empty($falta) ? 0 : $falta; | |
910 | 911 | } |
911 | 912 | |
912 | 913 | protected function getDadosMatricula($matriculaId) | ... | ... |