[Pkg-owncloud-commits] [php-sabre-vobject] 02/19: Fix BYDAY=-5TH
David Prévot
taffit at moszumanska.debian.org
Tue May 19 20:10:12 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository php-sabre-vobject.
commit ffdfc3dc3f3986ae7fceab0e0b16201f11f3d1a6
Author: Tomas Lindquist Olsen <tomas.l.olsen at gmail.com>
Date: Wed Mar 11 01:26:52 2015 +0100
Fix BYDAY=-5TH
Had this RRULE case, essentially "all but the last thursday in the
month"
RRULE:FREQ=MONTHLY;BYDAY=-2TH,-3TH,-4TH,-5TH
---
lib/Recur/RRuleIterator.php | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/Recur/RRuleIterator.php b/lib/Recur/RRuleIterator.php
index 0a8f9bc..23533dd 100644
--- a/lib/Recur/RRuleIterator.php
+++ b/lib/Recur/RRuleIterator.php
@@ -787,7 +787,10 @@ class RRuleIterator implements Iterator {
} else {
// if it was negative we count from the end of the array
- $byDayResults[] = $dayHits[count($dayHits) + $offset];
+ // might not exist, fx. -5th tuesday
+ if (isset($dayHits[count($dayHits) + $offset])) {
+ $byDayResults[] = $dayHits[count($dayHits) + $offset];
+ }
}
} else {
// There was no counter (first, second, last wednesdays), so we
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabre-vobject.git
More information about the Pkg-owncloud-commits
mailing list