Javascript 'red alert' for submit script in PHPStorm 4

Hello to all

I've a problem with this code:

static public function bounce_back()
    {
        ?>
    <form id="frmEndWork" name="frmEndWork"  method="post">
    </form>
    <script language="javascript">
        <!--//
            document.forms["frmEndWork"].submit();
        //--->
    </script>
    <?php
    }



wrote this way, or this way:

static public function bounce_back()
    {
        ?>
    <form name="frmEndWork"  method="post">
    </form>
    <script language="javascript">
        <!--//
            frmEndWork.submit();
        //--->
    </script>
    <?php
    }
should work correctly, and so it does... but, while in PHPStorm 3.0.3 is working all fine,



in PHP EAP 4 (and still in PHP 4.0.1 RC, didn't tried in PHP 4.0.1, but the installer says to be the same release)

it answers me a ridicoul and 'red alert' message "Must be lvalue"

WTF is lvalue? How can I disable it? My server is a not-such-updated one, so I prefer not to work over newest programming ways.


Any help?
3 comments

Hi Maurco,

That's because of  //--->  -- it has 3 dashes. Change it to 2 ( //-->  ) and error will be gone.

0

I. C A N ' T. B E L I E V E. I T. !

It worked fine! Great!

In fact, since PHPStorm 3 (first I used), it was angry with "<!--//" if minus where more than two (as I learn at school, it shouldn't interfer in anyway if they are 2, 3, 4 or neverended...)

but at least, when it was 'anger' of them, it 'red alerted' the "<!---//" line... not the code, and because they where 3, I didn't noticed, neither thought at, them.

Thanks, Andriy!

0

I suggest submitting new ticket with your suggestion (highlight comment and not the code) to the Issue Tracker if you want PhpStorm to be more precise/accurate in this regard: http://youtrack.jetbrains.net/dashboard/WI

0

Please sign in to leave a comment.