mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-02-24 23:45:38 +08:00
fix php 8
This commit is contained in:
parent
106aaf827f
commit
8d83763b62
3 changed files with 11 additions and 7 deletions
|
@ -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){
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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>';
|
||||
|
|
Loading…
Reference in a new issue