File: check_const_with_defined.patch

package info (click to toggle)
eluceo-ical 0.16.1-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 596 kB
  • sloc: php: 2,894; makefile: 27; sh: 7
file content (21 lines) | stat: -rw-r--r-- 789 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
From: Joe Nahmias <joe@nahmias.net>
Date: Tue, 31 May 2022 15:59:34 -0400
Subject: check_const_with_defined

---
 src/Property/Event/RecurrenceRule.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Property/Event/RecurrenceRule.php b/src/Property/Event/RecurrenceRule.php
index c5015c9..41680a0 100644
--- a/src/Property/Event/RecurrenceRule.php
+++ b/src/Property/Event/RecurrenceRule.php
@@ -245,7 +245,7 @@ class RecurrenceRule implements ValueInterface
      */
     public function setFreq($freq)
     {
-        if (@constant('static::FREQ_' . $freq) !== null) {
+        if (defined('static::FREQ_' . $freq)) {
             $this->freq = $freq;
         } else {
             throw new \InvalidArgumentException("The Frequency {$freq} is not supported.");