]> git.agnieray.net Git - galette.git/commitdiff
Fix "dead" code
authorJohan Cwiklinski <johan@x-tnd.be>
Sat, 6 Nov 2021 10:09:51 +0000 (11:09 +0100)
committerJohan Cwiklinski <johan@x-tnd.be>
Sun, 7 Nov 2021 05:50:39 +0000 (06:50 +0100)
galette/lib/Galette/Entity/Contribution.php

index 608d5de92215cdbc05d2676ee9363cfa9a829695..4a85b17a56e4f3d498a8168080fb8fa80f632915 100644 (file)
@@ -538,12 +538,8 @@ class Contribution
         if ($this->isFee() && count($this->errors) == 0) {
             $overlap = $this->checkOverlap();
             if ($overlap !== true) {
-                if ($overlap === false) {
-                    $this->errors[] = _T("An error occurred checking overlapping fees :(");
-                } else {
-                    //method directly return error message
-                    $this->errors[] = $overlap;
-                }
+                //method directly return error message
+                $this->errors[] = $overlap;
             }
         }
 
@@ -707,11 +703,7 @@ class Contribution
             }
             //update deadline
             if ($this->isFee()) {
-                $deadline = $this->updateDeadline();
-                if ($deadline !== true) {
-                    //if something went wrong, we roll back transaction
-                    throw new \Exception('An error occurred updating member\'s deadline');
-                }
+                $this->updateDeadline();
             }
 
             //dynamic fields