Skip to content

Commit dc6a879

Browse files
authored
check info
1 parent 50e37fd commit dc6a879

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/AkauntingCollector.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ public function collect()
2929
$default_income_category = $default_expense_category = [];
3030

3131
$info = Info::all();
32-
$akaunting_version = $info['akaunting'];
33-
$total_companies = $info['companies'];
34-
$total_users = $info['users'];
32+
$akaunting_version = ! empty($info['akaunting']) ? $info['akaunting'] : '0.0.0';
33+
$total_companies = ! empty($info['companies']) ? $info['companies'] : '0';
34+
$total_users = ! empty($info['users']) ? $info['users'] : '0';
3535
$company_id = company_id();
3636
$company_date_format = company_date_format() . ' (' . company_date(Date::createFromTimestamp(0)) . ')';
3737

src/ServerCollector.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ public function collect()
2222
$requirements = Installer::checkServerRequirements();
2323

2424
return [
25-
'PHP' => $versions['php'],
26-
'MySQL' => $versions['mysql'],
25+
'PHP' => ! empty($info['php']) ? $info['php'] : '0.0.0',
26+
'MySQL' => ! empty($info['mysql']) ? $info['mysql'] : '0.0.0',
2727
'Memory Limit' => ini_get('memory_limit'),
2828
'Execution Time' => ini_get('max_execution_time'),
2929
'PHP OS' => PHP_OS,

0 commit comments

Comments
 (0)