Fix "Trying to access array offset on value of type null"

Whoops\Exception\ErrorException thrown with message "Trying to access array offset on value of type null"

Stacktrace:
#4 Whoops\Exception\ErrorException in /var/www/enginegp/data/www/demo.enginegp.com/system/acp/sections/tarifs/index.php:42
#3 Whoops\Run:handleError in /var/www/enginegp/data/www/demo.enginegp.com/system/acp/sections/tarifs/index.php:42
#2 include in /var/www/enginegp/data/www/demo.enginegp.com/system/acp/engine/tarifs.php:32
#1 include in /var/www/enginegp/data/www/demo.enginegp.com/system/acp/distributor.php:63
#0 include in /var/www/enginegp/data/www/demo.enginegp.com/acp/index.php:50
This commit is contained in:
Sergei Solovev 2023-09-02 23:11:48 +03:00
parent 28e21ea3f0
commit 49abaa470a

View file

@ -39,7 +39,11 @@ else {
$list .= '<tr>';
$list .= '<td>' . $tarif['id'] . '</td>';
$list .= '<td><a href="' . $cfg['http'] . 'acp/tarifs/id/' . $tarif['id'] . '">' . $tarif['name'] . '</a></td>';
if ($unit) {
$list .= '<td>#' . $tarif['unit'] . ' ' . $unit['name'] . '</td>';
} else {
$list .= '<td>#' . $tarif['unit'] . ' ' . 'Локация отсутствует' . '</td>';
}
$list .= '<td>' . $tarif['slots_min'] . '-' . $tarif['slots_max'] . '</td>';
$list .= '<td>' . $tarif['port_min'] . '-' . $tarif['port_max'] . '</td>';
$list .= '<td>' . strtoupper($tarif['game']) . '</td>';