fix php 8

This commit is contained in:
Ibnu Maksum 2023-09-26 13:50:02 +07:00
parent 106aaf827f
commit 8d83763b62
No known key found for this signature in database
GPG key ID: 7FC82848810579E5
3 changed files with 11 additions and 7 deletions

View file

@ -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){

View file

@ -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;

View file

@ -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'. '<br>';