fix warnings for optional regexp blocks

master
Tanguy Pruvot 2010-10-29 03:26:02 +02:00
rodzic decebcd3b5
commit f28be0bc55
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -22,7 +22,7 @@ class SG_iCal_Duration {
public function __construct( $duration ) {
if( $duration{0} == 'P' || (($duration{0} == '+' || $duration{0} == '-') && $duration{1} == 'P') ) {
preg_match('/P((\d+)W)?((\d+)D)?(T)?((\d+)H)?((\d+)M)?((\d+)S)?/', $duration, $matches);
$results = array('weeks'=>(int)$matches[2],
$results = @ array('weeks'=>(int)$matches[2],
'days'=>(int)$matches[4],
'hours'=>(int)$matches[7],
'minutes'=>(int)$matches[9],