Since 2 days ago, I saw a strange behaviour, important to take into consideration and solve ASAP.
For example, look at this code. It’s a code on a onExecute event from a Blank app. (I extracted from sc_tbevt -> Field Codigo from SC database, to get exactly the text saved)
function cargaDepartamentos(){
$ruta_imagenes = $_SESSION['scriptcase']['TPV']['glo_nm_path_imagens'] . "/departamentos/";
$consulta = "SELECT * FROM departamentos";
sc_lookup(datos, $consulta);
$estructura='';
foreach({datos} as $indice => $fila){
if ($fila[2]!='') {
$imagen = '<img src="'.$ruta_imagenes.$fila[2].'"height=75px width=75px><br>';
} else {
$imagen = '';
}
$estructura .= '<a href=# onclick="cargaProductos('.$fila[0].');return false;"><div class="cajasombra departamentos" style="background-color:'.$fila[3].'">'. $imagen .'<p class="texto-vertical-align">'. $fila[1].'</p></div></a>';
}
echo $estructura;
}
Code it’s ok, nothing wrong, any syntax file and so on. All “perfect”. But on generation we got weird errors, and looking into PHP generated file, this is what I got in the foreach loop. Just, inside foreach …
foreach($datos as $indice => $fila){
if$this->SC_function_0($fila[2]!='') { // <--------- $this->SC_function_0 ???? WTH?
$this->SC_function_0 $imagen = '<img src="'.$ruta_imagenes.$fila[2].'"height=75px width=75px><br>'; // <--------- $this->SC_function_0 ???? WTH?
} else {
$this->SC_function_0 $imagen = ''; // <--------- $this->SC_function_0 ???? WTH?
}
$estructura .= '<a href=# onclick="cargaProductos('.$fila[0].');return false;"><div class="cajasombra departamentos" style="background-color:'.$fila[3].'">'. $imagen .'<p class="texto-vertical-align">'. $fila[1].'</p></div></a>';
}
To solve it, I had to delete previous TABS, and do a intro again and then it solved, but I got a lot of lines like this in the generation. On SC database all is ok, with TABS, no strange spaces, and so on…