From 0aa7556581f38f2bc17a44779a0be2401ffab407 Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Sun, 22 Apr 2018 22:06:06 -0300 Subject: [PATCH] Remoção de mensagens de erros de programas php --- classesphp/mapa_controle.php | 2 +- classesphp/mapa_openlayers.php | 9 ++++++--- ferramentas/safe.php | 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/classesphp/mapa_controle.php b/classesphp/mapa_controle.php index 4fc58e5..87d28c1 100755 --- a/classesphp/mapa_controle.php +++ b/classesphp/mapa_controle.php @@ -235,7 +235,7 @@ if ($funcao == "criaMapa") { include_once (dirname(__FILE__) . "/../ms_criamapa.php"); if (isset($_SESSION["logExec"])) { - if($_SESSION["logExec"]["controle"] == true){ + if(@$_SESSION["logExec"]["controle"] == true){ i3GeoLog("prog: mapa_controle url: " . implode("&", array_merge($_GET, $_POST)), $_SESSION["dir_tmp"]); } } diff --git a/classesphp/mapa_openlayers.php b/classesphp/mapa_openlayers.php index 854af7f..a48ae99 100755 --- a/classesphp/mapa_openlayers.php +++ b/classesphp/mapa_openlayers.php @@ -59,15 +59,14 @@ include ("sani_request.php"); if (! function_exists('ms_GetVersion')) { include_once ("carrega_ext.php"); } -// error_reporting(0); +//error_reporting(E_ALL); inicializa(); // // calcula a extensao geografica com base no x,y,z // nos casos do modo notile, a requisicao e feita como se fosse um wms // quando for do tipo tms $_GET["tms"] contem os parametros do tile // - -if (isset($_GET["tms"])) { +if (!empty($_GET["tms"])) { $_GET["WIDTH"] = 256; $_GET["HEIGHT"] = 256; $temp = explode("/", $_GET["tms"]); @@ -545,15 +544,19 @@ function carregaCacheImagem($cachedir, $map, $tms, $i3georendermode = 0, $format $nome = str_replace(".png","",$nome) . ".png"; $tipo = "image/png"; } + if (file_exists($nome)) { + cabecalhoImagem($nome,$tipo); if ($i3georendermode = 0 || $i3georendermode = 1 || empty($i3georendermode)) { readfile($nome); } else { header("X-Sendfile: ".$nome); } + exit(); } + } function nomeRand($n = 10) diff --git a/ferramentas/safe.php b/ferramentas/safe.php index fa7856a..5f17179 100755 --- a/ferramentas/safe.php +++ b/ferramentas/safe.php @@ -33,12 +33,12 @@ else{ } //variaveis mais utilizadas -$tema = $_GET["tema"]; +$tema = @$_GET["tema"]; if(isset($_GET["ext"])){ $ext = $_GET["ext"]; } -$funcao = $_GET["funcao"]; +$funcao = @$_GET["funcao"]; include_once(dirname(__FILE__)."/../classesphp/funcoes_gerais.php"); -- libgit2 0.21.2