kopia lustrzana https://github.com/friendica/SG-iCalendar
fix warnings for optional regexp blocks
rodzic
decebcd3b5
commit
f28be0bc55
|
@ -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],
|
||||
|
|
Ładowanie…
Reference in New Issue