Announcement

Collapse
No announcement yet.

[SOLVED] Error in PHP generation due to "character"

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • [SOLVED] Error in PHP generation due to "character"

    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)
    PHP Code:
    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 ....

    PHP Code:
         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...
    /Giuseppe

    Professional Scriptcase Services
    Some Customers opinions

  • #2
    Hello,

    Issue reported to our bugs team.

    regards,
    Bernhard Bernsmann

    Comment


    • #3
      Hello,

      could you please explain this problem better? And more detail still as you solved the same.

      Thank you!
      Best regards,
      Thomas Soares.
      ScriptCase International.

      Email: t.soares@scriptcase.net
      Visit our Blog: http://www.scriptcase.net/blog/
      Visit out fan page: http://www.facebook.com/Scriptcase

      Comment


      • #4
        I Have the same issue, lots of "$this->SC_function_0 " in generated code. Any idea to solve this? Thanks!

        Comment


        • #5
          Hi Giu,

          Have you tried to make a Scriptcase method? Instead of a function on blank event.
          --
          Caio Guerra
          Scriptcase - Web Developer
          www.scriptcase.net

          Comment


          • #6
            Hi Caio,

            Didn't tried because because is not an external function on a blank, is a blank full of code, and this is one of the functions inside
            /Giuseppe

            Professional Scriptcase Services
            Some Customers opinions

            Comment


            • #7
              ' problem

              Hi

              This is an Old Old Old problem on all release the " ' " have always done a code generation problem randomly

              regards

              Comment


              • #8
                Hi Giuseppe,

                I have tried to perform the case, but I couldn't. I did the folowing code on blank event:

                PHP Code:
                function teste()
                {
                    
                $arr = array('host' => '127.0.0.1''user' => 'root''pass' => 'teste');
                    
                    foreach(
                $arr as $key => $value)
                    {
                        echo 
                $key ": " $value "<br />";
                    }
                }

                teste(); 
                The application was executed normally. Do I need to make anything to get the error?
                --
                Caio Guerra
                Scriptcase - Web Developer
                www.scriptcase.net

                Comment


                • #9
                  Hello,

                  Do you any news about this problem?
                  Best Regards,
                  John L. Santos

                  Bug Tracker Team
                  NetMake - IT Solutions

                  Comment


                  • #10
                    Originally posted by John L. Santos View Post
                    Hello,

                    Do you any news about this problem?
                    For me, this just didn't happened again.
                    /Giuseppe

                    Professional Scriptcase Services
                    Some Customers opinions

                    Comment


                    • #11
                      Hello,

                      Maybe this problem has been fixed from other fixes.
                      I will for this thread as solved by now, but if the problem occurs again, I ask you to inform us.
                      Best Regards,
                      John L. Santos

                      Bug Tracker Team
                      NetMake - IT Solutions

                      Comment

                      Working...
                      X