The error that is generated is as follows:
Notice: Only variables should be passed by reference in
Can you tell me how to solve it? According to the error, it is in this part:
$extensoes_aceitas = array('bmp' ,'png', 'svg', 'jpeg', 'jpg');
$extensao = end(explode('.', $_FILES['foto']['name']));
Follow the code ...
if ($acao == 'incluir'):
$nome_foto = 'padrao.jpg';
if(isset($_FILES['foto']) && $_FILES['foto']['size'] > 0):
$extensoes_aceitas = array('bmp' ,'png', 'svg', 'jpeg', 'jpg');
$extensao = end(explode('.', $_FILES['foto']['name']));
// Validamos se a extensão do arquivo é aceita
if (array_search($extensao, $extensoes_aceitas) === false):
echo "<h1>Extensão Inválida!</h1>";
exit;
endif;