Error Notice Undefined index
Olá estou migrando um sistema para outro servidor, sendo que o servidor antigo o php era versão 5.4.29 e o atual é 5.4.40.
Bem, estou usando variáveis php em um bloco de java script e ele me retorno o error de Underfine index.
$directionsService.route({
origin: "<?php echo $_POST["pontoa"]["endereco"] . ' ' . $_POST["pontoa"]["numero"] . ' ' . $_POST["pontoa"]["bairro"] . ' ' . $_POST["pontoa"]["cidade"] ?>",
destination: "<?php echo $_POST['pontob']['endereco'] . ' ' . $_POST['pontob']['numero'] . ' ' . $_POST['pontob']['bairro'] . ' ' . $_POST['pontob']['cidade'] ?>",
<?php if(!isset($_POST['ponto2']['endereco']) && !isset($_POST['ponto3']['endereco']) && !isset($_POST['ponto4']['endereco'])){ ?>
waypoints: [
{location: "<?php echo $_POST['ponto2']['endereco'] . ' ' . $_POST['ponto2']['numero'] . ' ' . $_POST['ponto2']['bairro'] . ' ' . $_POST['ponto2']['cidade'] ?>"}, {location: "<?php echo $_POST['ponto3']['endereco'] . ' ' . $_POST['ponto3']['numero'] . ' ' . $_POST['ponto3']['bairro'] . ' ' . $_POST['ponto3']['cidade'] ?>"}, {location: "<?php echo $_POST['ponto4']['endereco'] . ' ' . $_POST['ponto4']['numero'] . ' ' . $_POST['ponto4']['bairro'] . ' ' . $_POST['ponto4']['cidade'] ?>"}
],
<?php }else if(!isset($_POST['ponto2']['endereco']) && !isset($_POST['ponto3']['endereco'])){?>
waypoints: [
{location: "<?php echo $_POST['ponto2']['endereco'] . ' ' . $_POST['ponto2']['numero'] . ' ' . $_POST['ponto2']['bairro'] . ' ' . $_POST['ponto2']['cidade'] ?>"}, {location: "<?php echo $_POST['ponto3']['endereco'] . ' ' . $_POST['ponto3']['numero'] . ' ' . $_POST['ponto3']['bairro'] . ' ' . $_POST['ponto3']['cidade'] ?>"}
],
<?php }elseif (!isset($_POST['ponto2']['endereco'])){ ?>
waypoints: [
{location: "<?php echo $_POST['ponto2']['endereco'] . ' ' . $_POST['ponto2']['numero'] . ' ' . $_POST['ponto2']['bairro'] . ' ' . $_POST['ponto2']['cidade'] ?>"}
],
<?php } ?>
travelMode: google.maps.DirectionsTravelMode.DRIVING
}, function (response, status) {
if (status == google.maps.DirectionsStatus.OK)
$directionsDisplay.setDirections(response);
});
};Discussão (1)
Carregando comentários...