You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The reason will be displayed to describe this comment to others. Learn more.
With your code if pertcentage is 0 function return -1 . With correct code
it returns 0 as it should.
Le 20 août 2012 18:18, "Regis Houssin" notifications@github.com a écrit :
yes but GETPOSTt already use an "isset"
more in this context "percentage" return (-1, 0, or >0)
So (GETPOST('percentage') >= 0) is okay
—
Reply to this email directly or view it on GitHubhttps://github.com/Dolibarr/dolibarr/commit/2ab1a018df805a08fffb063b41116e396264f5d2#commitcomment-1738295.
2ab1a01
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't uderstand !
GETPOST return 0 if value 0 or empty if empty !
you can use if (GETPOST('percentage') >= 0)
2ab1a01
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But he is talking about isset, not about if it is empty or not
2ab1a01
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes but GETPOSTt already use an "isset"
more in this context "percentage" return (-1, 0, or >0)
So (GETPOST('percentage') >= 0) is okay
2ab1a01
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.