Hello,
I have a problem with a part of the code:
function obterBD($nome){
// Conecatar banco de dados
if(!$conn = connectBD()){
return false;
}
// Incluir/Atualizar retorno no banco de dados
$arrayReturn = getnota($conn, $nome);
if(isset($arrayReturn['registros'])){
return $arrayReturn;
}
$arrayReturn = array_merge(getmatricula($conn, $nome), $arrayReturn);
$arrayReturn = array_merge(getnomecompleto($conn, $nome), $arrayReturn);
// Encerra conexão com banco
closeBD($conn);
return $arrayReturn;
}
The page is as follows:
Make a request in a webservice and get the data. It turns out that sometimes the "fullname" does not exist and then an error is displayed:
Warning: array_merge(): Argument #1 is not an array in path on line 69
$arrayReturn = array_merge(getnomecompleto($conn, $nome), $arrayReturn); --> Essa é a linha 69.
And if I comment on this line the error disappears. How do I put it so that if I can not get the full name, write something like: "Not available"?