File: check_const_with_defined.patch

package info (click to toggle)
eluceo-ical 0.16.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 516 kB
  • sloc: php: 2,890; makefile: 23; sh: 7
file content (11 lines) | stat: -rw-r--r-- 455 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
--- a/src/Property/Event/RecurrenceRule.php
+++ b/src/Property/Event/RecurrenceRule.php
@@ -245,7 +245,7 @@ class RecurrenceRule implements ValueInt
      */
     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.");