mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Redundant comparison
if it's a numeric integer (hence non-empty [0-9]+ ) and the first char isn't "0" then the value will always be >0, so test is redundant
This commit is contained in:
parent
d2013d1257
commit
667fd2b7e2
@ -42,8 +42,8 @@ if (isset($_POST['referer'])) {
|
||||
}
|
||||
|
||||
function is_posnumericint($arg) {
|
||||
// Note that to be safe we do not allow any leading zero - "01", "007"
|
||||
return (is_numericint($arg) && $arg[0] != '0' && $arg > 0);
|
||||
// Integer > 0? (Note that to be safe we do not allow any leading zero - "01", "007")
|
||||
return (is_numericint($arg) && $arg[0] != '0');
|
||||
}
|
||||
|
||||
function is_aoadv_used($rule_config) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user