mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-05-19 14:01:38 -04:00
Fix checkNumeric validation (#3872)
This commit is contained in:
@@ -89,14 +89,15 @@ class Secure_Controller extends BaseController
|
||||
*/
|
||||
public function getCheckNumeric(): void
|
||||
{
|
||||
$result = true;
|
||||
|
||||
foreach($this->request->getGet(null, FILTER_SANITIZE_FULL_SPECIAL_CHARS) as $value)
|
||||
{
|
||||
$result &= (int)parse_decimals($value);
|
||||
if (!parse_decimals($value))
|
||||
{
|
||||
echo 'false';
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
echo $result !== false ? 'true' : 'false';
|
||||
echo 'true';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user