Prechádzať zdrojové kódy

Merge tag 'V8-3046' into develop

Vincent GUFFON 3 rokov pred
rodič
commit
b77f15fdfe
1 zmenil súbory, kde vykonal 4 pridanie a 3 odobranie
  1. 4 3
      src/Service/Organization/Utils.php

+ 4 - 3
src/Service/Organization/Utils.php

@@ -76,11 +76,12 @@ class Utils
      * @see UtilsTest::testGetOrganizationCurrentActivityYear()
      */
     public static function getOrganizationCurrentActivityYear(Organization $organization): int{
-        $musicalDate = $organization->getParameters()->getMusicalDate();
-        if(empty($musicalDate)) $musicalDate = new \DateTime('now');
-
         $today = new \DateTime();
         $year = intval($today->format('Y'));
+
+        $musicalDate = $organization->getParameters()->getMusicalDate();
+        if(empty($musicalDate)) $musicalDate = new \DateTime($year.'-08-31');
+
         $base_date = new \DateTime($musicalDate->format($year.'-m-d'));
         $dateStart = new \DateTime($year . '-01-01');