fix ?add_member when PATH_INFO is not set (closes #96, thanks Thomas Zell!)

This commit is contained in:
Florian Schlichting 2016-12-04 01:07:23 +01:00
parent 9a4589123e
commit 1548893229

View File

@ -149,7 +149,7 @@ class CalDAVRequest
else {
$this->path = '/';
if ( isset($_SERVER['REQUEST_URI']) ) {
if ( preg_match( '{^(.*?\.php)(.*)$}', $_SERVER['REQUEST_URI'], $matches ) ) {
if ( preg_match( '{^(.*?\.php)([^?]*)}', $_SERVER['REQUEST_URI'], $matches ) ) {
$this->path = $matches[2];
if ( substr($this->path,0,1) != '/' )
$this->path = '/'.$this->path;