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.");
|