From beee46dd3c1b72d7c0418aaf40d25a9182847414 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 25 Jan 2012 08:13:11 +1300 Subject: [PATCH] Correct variable name used parsing RFC5545 duration. --- inc/RRule-v2.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/RRule-v2.php b/inc/RRule-v2.php index 72b0d1b3..aca9dfbc 100644 --- a/inc/RRule-v2.php +++ b/inc/RRule-v2.php @@ -115,7 +115,7 @@ class Rfc5545Duration { */ function asSeconds() { if ( !isset($this->epoch_seconds) ) { - if ( preg_match('{^(-?)P(\d+W)|((\d+D)?(T(\d+H)?(\d+M)?(\d+S)?)?)$}i', $subject, $matches) ) { + if ( preg_match('{^(-?)P(\d+W)|((\d+D)?(T(\d+H)?(\d+M)?(\d+S)?)?)$}i', $this->as_text, $matches) ) { if ( isset($matches[2]) ) $this->days = ($matches[2] * 7); else { if ( isset($matches[4]) ) $this->days = $matches[4]; -- 2.11.4.GIT