Announcement

Collapse
No announcement yet.

Bug on a simple piece of php

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

  • Bug on a simple piece of php

    Code in scriptcase:
    if (in_array('1',$waarde) and {RUG_MUTFKEUZE1} == '1') sc_field_display({DT_PEOPLESOFT1}, on);
    Code generated:
    29195| if (in_array('1',$waarde) and $this->rug_mutfkeuze1 == '1') $this->nmgp_cmp_hidden["dt_peoplesoft1"] = "on"; $this->NM_ajax_info['fieldDisplay']['dt_peoplesoft1'] = 'on';


    Result: This is seriously bad..

    The php manual says so:
    http://php.net/manual/en/control-structures.if.php
    The following example would display a is bigger than b if $a is bigger than $b:
    <?php
    if ($a > $b)
    echo "a is bigger than b";
    ?>

    Thus scriptcase messes up the code with the { and }


    Temporary solution untill they fix this bug (which I reported earlier as well)...
    if (in_array('1',$waarde) and {RUG_MUTFKEUZE1} == '1') {sc_field_display({DT_PEOPLESOFT1}, on)};

    This then gives:
    29195| if (in_array('1',$waarde) and $this->rug_mutfkeuze1 == '1') {$this->nmgp_cmp_hidden["dt_peoplesoft1"] = "on"; $this->NM_ajax_info['fieldDisplay']['dt_peoplesoft1'] = 'on';};


    Please fix this...
    In the first erroneous example it SHOULD generate the proper code which it didnt...
Working...
X