You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "ElleLuca (via GitHub)" <gi...@apache.org> on 2023/06/03 08:23:06 UTC

[GitHub] [netbeans] ElleLuca opened a new issue, #6018: Incorrect "Bad value" warning for dynamically assigned variable

ElleLuca opened a new issue, #6018:
URL: https://github.com/apache/netbeans/issues/6018

   ### Apache NetBeans version
   
   Apache NetBeans 18
   
   ### What happened
   
   On this line
   
    <input id="actionPrice" class="border-0 text-primary" name="actionPrice" step="0.01" type="number" value="<?php echo $_SESSION['stock']['action_price']; ?>">
    
    the IDE flags
    
    "Bad value " " for attribute "value on element 'input": Expected a minus sign or a digit but saw " instead " for attribute "value" on element "input": Expected a minus sign or a digit but saw "
   From line 68, column 9; to line 68, column 119
   (Rule Category: Attributes)
   "
   
   As the value of $_SESSION['stock']['action_price'] is dynamically set during runtime and the IDE cannot determine its actual value, it should not report an error - which causes the programmer to think that the syntax is wrong.
   
   I wasn't able to resolve this even with chatGPT :) which suggested to ignore the warning (provided that at runtime the type checks are ok).
   
   Still the warning is annoying.
   
   ### How to reproduce
   
   _No response_
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   Mac OS X version 13.2.1 running on x86_64; UTF-8; en_US (nb)
   
   ### JDK
   
   Java(TM) SE Runtime Environment 19.0.2+7-44
   
   ### Apache NetBeans packaging
   
   Apache NetBeans provided installer
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists