wip events_played / by zero

This commit is contained in:
salam committed 2026-08-04 07:27:55 +02:00
1 parent e198a7aa00
commit 4f53fe8023
1 file changed
+4 -3
+4 -3
View File
@@ -2,9 +2,9 @@
namespace App\Actions\Selections;
use App\Models\SofaScorePlayerPerSeason;
use App\Models\SofaScorePlayerPosition;
use App\Models\StatistikoEvent;
use App\Models\SofaScorePlayerPosition;
use App\Models\SofaScorePlayerPerSeason;
use Filament\Schemas\Components\Utilities\Get;
class LoadPlayer
@@ -69,7 +69,8 @@ class LoadPlayer
$infostring = $events_played;
if ($preferred_foot)
$infostring .= ' - ' . $preferred_foot;
$infostring .= ' - ' . round($minues_played / $events_played) . 'min';
if ($events_played)
$infostring .= ' - ' . round($minues_played / $events_played) . 'min';
if ($events_played < $colorlevel) {
$arr[$position][$val->ss_player_id] = '<span class="text-red-600 dark:text-red-500"><b>' . $val->details->player_name . '</b><br>' . $infostring . '</span>';