mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-07-11 23:46:35 -04:00
Restore ctype_digit
This commit is contained in:
committed by
FrancescoUK
parent
019fc7a3d5
commit
f49c896e4f
@@ -66,7 +66,7 @@ class Item extends CI_Model
|
||||
$this->db->where('item_number', (string) $item_number);
|
||||
// check if $item_id is a number and not a string starting with 0
|
||||
// because cases like 00012345 will be seen as a number where it is a barcode
|
||||
if(is_numeric($item_id) && substr($item_id, 0, 1) != '0')
|
||||
if(ctype_digit($item_id) && substr($item_id, 0, 1) != '0')
|
||||
{
|
||||
$this->db->where('item_id !=', (int) $item_id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user