diff --git a/system/autoload/Lang.php b/system/autoload/Lang.php index de8dca4c..ad91e02f 100644 --- a/system/autoload/Lang.php +++ b/system/autoload/Lang.php @@ -56,7 +56,11 @@ class Lang } public static function arrayCount($arr){ - return count($arr); + if(is_array($arr)){ + return count($arr); + }else{ + return 0; + } } public static function getNotifText($key){ diff --git a/system/controllers/prepaid.php b/system/controllers/prepaid.php index 6dd0709f..abae183d 100644 --- a/system/controllers/prepaid.php +++ b/system/controllers/prepaid.php @@ -260,10 +260,10 @@ switch ($action) { break; case 'print-voucher': - $from_id = _post('from_id') * 1; - $planid = _post('planid') * 1; - $pagebreak = _post('pagebreak') * 1; - $limit = _post('limit') * 1; + $from_id = _post('from_id'); + $planid = _post('planid'); + $pagebreak = _post('pagebreak'); + $limit = _post('limit'); if ($pagebreak < 1) $pagebreak = 6; diff --git a/system/controllers/routers.php b/system/controllers/routers.php index a798aec4..8f4ed11f 100644 --- a/system/controllers/routers.php +++ b/system/controllers/routers.php @@ -70,7 +70,7 @@ switch ($action) { $username = _post('username'); $password = _post('password'); $description = _post('description'); - $enabled = _post('enabled')*1; + $enabled = _post('enabled'); $msg = ''; if(Validator::Length($name,30,4) == false){ @@ -113,7 +113,7 @@ switch ($action) { $username = _post('username'); $password = _post('password'); $description = _post('description'); - $enabled = $_POST['enabled']*1; + $enabled = $_POST['enabled']; $msg = ''; if(Validator::Length($name,30,4) == false){ $msg .= 'Name should be between 5 to 30 characters'. '
';