Procházet zdrojové kódy

Minor - fix notice

jmontoyaa před 7 roky
rodič
revize
69faf05098
1 změnil soubory, kde provedl 5 přidání a 3 odebrání
  1. 5 3
      main/inc/lib/tracking.lib.php

+ 5 - 3
main/inc/lib/tracking.lib.php

@@ -4638,9 +4638,11 @@ class Tracking
                             $best = 0;
                             if (!empty($results)) {
                                 foreach ($results as $result) {
-                                    $score = $result['exe_result'] / $result['exe_weighting'];
-                                    if ($score > $best) {
-                                        $best = $score;
+                                    if (!empty($result['exe_weighting'])) {
+                                        $score = $result['exe_result'] / $result['exe_weighting'];
+                                        if ($score > $best) {
+                                            $best = $score;
+                                        }
                                     }
                                 }
                             }