Commit 193785209ff1b4e66580af71fdf0d39f830764d8

Authored by Matheus Nicoski
1 parent 1f584a48
Exists in 2.8 and in 6 other branches 2.2, 2.3, 2.4, 2.5, 2.6, 2.7

Adiciona ternario para data nascimento

ieducar/modules/Api/Views/PessoaController.php
... ... @@ -594,7 +594,7 @@ class PessoaController extends ApiCoreController
594 594 {
595 595 $individual = LegacyIndividual::findOrNew($pessoaId);
596 596 $individual->idpes = $pessoaId;
597   - $individual->data_nasc = Portabilis_Date_Utils::brToPgSQL($this->getRequest()->datanasc);
  597 + $individual->data_nasc = empty($this->getRequest()->datanasc) ? null : Portabilis_Date_Utils::brToPgSQL($this->getRequest()->datanasc);
598 598 $individual->sexo = $this->getRequest()->sexo;
599 599 $individual->ref_cod_sistema = null;
600 600 $individual->ideciv = $this->getRequest()->estadocivil ?: $individual->ideciv;
... ...