ID:               38202
 Updated by:       [EMAIL PROTECTED]
 Reported By:      franz at fholzinger dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: LINUX Red Hat
 PHP Version:      4.4.2
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.




Previous Comments:
------------------------------------------------------------------------

[2006-07-25 07:33:33] franz at fholzinger dot com

Description:
------------
same as bug #7293 weird javascript mangling

Same bug here with PHP 4.3.11.

See files
http://fholzinger.com/development/error_for_negative.zip
which are part of TYPO3 4.0 and the tt_products 2.5.0 shop system
extension.

This error happens only when I e.g. add the following lines in PHP to
JavaScript.

 for (var l=8; l>1; l--)        {
        b = l;
   }

This make the generated JavaScript broken.

for (var k=0; k<len; k="" sboptionsk1="new" optioncccategory2k0=""
ccategory2k="" for="" var="" l="">1; l--)       {
        b = l;
       }

The for some lines above get bad now. Without the lines above this has
worked fine however.

The line before them are in the PHP string which will generate the
JavaScript:

for (var k=0; k<len; k++) {
       sb.options[k+1] = new Option(c[c[category][2][k]][0],
c[category][2][k]);
        }

I works however when I change the loop above to


 for (var l=8; l<15; l++)       {
        b = l;
   }


Regards,

Franz Holzinger

Reproduce code:
---------------
        $code .= '

for (var k=0; k<len; k++) {
        sb.options[k+1] = new Option(c[c[category][2][k]][0],
c[category][2][k]);
}
for (var l=8; l>1; l--) {
        b = l;
}'
...

Expected result:
----------------
The JavaScript output of the webbrowser shall be the text string from
above.

Actual result:
--------------
The loop above get broken.

for (var k=0; k<len; k="" sboptionsk1="new" optioncccategory2k0=""
ccategory2k="" for="" var="" l="">1; l--)       {
        b = l;
       }


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=38202&edit=1

Reply via email to