mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-18 01:31:21 +00:00
Skip the "text/calendar" record, so we don't run code that expects "="
Prevents this warning: PHP Warning: Undefined array key 1 in inc/iSchedule-POST.php on line 96
This commit is contained in:
parent
b26d48fced
commit
ba4c1eb989
@ -82,11 +82,16 @@ if ( $d->validateRequest ( ) ) {
|
|||||||
// TODO: add originator addressbook and existing event lookup as whitelist
|
// TODO: add originator addressbook and existing event lookup as whitelist
|
||||||
}
|
}
|
||||||
$method = $ical->GetPValue('METHOD');
|
$method = $ical->GetPValue('METHOD');
|
||||||
|
|
||||||
$content_type = explode ( ';', $_SERVER['CONTENT_TYPE'] );
|
$content_type = explode ( ';', $_SERVER['CONTENT_TYPE'] );
|
||||||
if ( $content_type[0] != 'text/calendar' )
|
if ( $content_type[0] != 'text/calendar' )
|
||||||
$reply->XMLResponse( 406, 'content must be text/calendar' );
|
$reply->XMLResponse( 406, 'content must be text/calendar' );
|
||||||
|
|
||||||
$content_parts = Array ();
|
$content_parts = Array ();
|
||||||
foreach ( $content_type as $v ) {
|
foreach ( $content_type as $v ) {
|
||||||
|
if ($v == 'text/calendar')
|
||||||
|
continue;
|
||||||
|
|
||||||
list ( $a, $b ) = explode ( '=', trim ( $v ), 2 );
|
list ( $a, $b ) = explode ( '=', trim ( $v ), 2 );
|
||||||
$content_parts[strtolower($a)] = strtoupper($b);
|
$content_parts[strtolower($a)] = strtoupper($b);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user