From 982357f55a5a2335d06f376346ae26e3a907f40a Mon Sep 17 00:00:00 2001 From: rlanvin Date: Sat, 27 Jun 2015 14:21:07 +0300 Subject: [PATCH] More PHP 5.3 compatibility fixes --- src/RRule.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/RRule.php b/src/RRule.php index 85400fc..399656e 100755 --- a/src/RRule.php +++ b/src/RRule.php @@ -267,15 +267,15 @@ class RRule implements \Iterator, \ArrayAccess switch ( $this->freq ) { case self::YEARLY: if ( ! not_empty($parts['BYMONTH']) ) { - $parts['BYMONTH'] = [(int) $this->dtstart->format('m')]; + $parts['BYMONTH'] = array((int) $this->dtstart->format('m')); } - $parts['BYMONTHDAY'] = [(int) $this->dtstart->format('j')]; + $parts['BYMONTHDAY'] = array((int) $this->dtstart->format('j')); break; case self::MONTHLY: - $parts['BYMONTHDAY'] = [(int) $this->dtstart->format('j')]; + $parts['BYMONTHDAY'] = array((int) $this->dtstart->format('j')); break; case self::WEEKLY: - $parts['BYDAY'] = [array_search($this->dtstart->format('N'), self::$week_days)]; + $parts['BYDAY'] = array(array_search($this->dtstart->format('N'), self::$week_days)); break; } } @@ -295,7 +295,7 @@ class RRule implements \Iterator, \ArrayAccess } if ( $matches[1] ) { - $this->byweekday_nth[] = [self::$week_days[$matches[2]], (int)$matches[1]]; + $this->byweekday_nth[] = array(self::$week_days[$matches[2]], (int)$matches[1]); } else { $this->byweekday[] = self::$week_days[$matches[2]];