diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index e69de29..b91ab68 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -0,0 +1,2 @@ +This is no official release! +The Release and the release notes will be generated by github actions diff --git a/src/structure/components/com_sportsmanager/mathparser.php b/src/structure/components/com_sportsmanager/mathparser.php index a079639..6d64f7c 100644 --- a/src/structure/components/com_sportsmanager/mathparser.php +++ b/src/structure/components/com_sportsmanager/mathparser.php @@ -2323,6 +2323,10 @@ function mp_mult_($p1, $p2): float|int */ function mp_div_($p1, $p2): float|int { + if ($p2 == 0) { + Log::add("Division by zero detected in mp_div_: divisor was 0. Returning 0 as fallback.", Log::WARNING, "com_sportsmanager"); + return 0; + } return $p1 / $p2; } diff --git a/src/structure/components/com_sportsmanager/views/sportsmanager/view_tools.php b/src/structure/components/com_sportsmanager/views/sportsmanager/view_tools.php index 2e60370..95fa6f8 100644 --- a/src/structure/components/com_sportsmanager/views/sportsmanager/view_tools.php +++ b/src/structure/components/com_sportsmanager/views/sportsmanager/view_tools.php @@ -40,7 +40,7 @@ function addOnLoad($function): void toString([