Possible workaround for "Exception: explode() expects parameter 2 to be string" after update to ownCloud 10.3.0

Hey,

today i have updated to the new ownCloud 10.3.0 and noticed that an error similar to the one below are showing up in my owncloud.log after starting Thunderbird / Lightning (which is connected to my ownCloud instance).

{"reqId":"ZVQSyZMNKP6ij5YxoehY","level":4,"time":"2019-10-19T11:59:44+02:00","remoteAddr":"192.168.2.15","user":"Username","app":"webdav","method":"PROPFIND","url":"\/remote.php\/dav\/addressbooks\/users\/Username\/contacts\/","message":"Exception: explode() expects parameter 2 to be string, null given: {\"Exception\":\"TypeError\",\"Message\":\"explode() expects parameter 2 to be string, null given\",\"Code\":0,\"Trace\":\"#0 \\\/PATH_TOcloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/CardDAV\\\/Plugin.php(689): explode(';', NULL)\\n#1 \\\/PATH_TOcloud\\\/lib\\\/composer\\\/sabre\\\/event\\\/lib\\\/WildcardEmitterTrait.php(96): Sabre\\\\CardDAV\\\\Plugin->propFindLate(Object(Sabre\\\\DAV\\\\PropFind), Object(OCA\\\\DAV\\\\CardDAV\\\\AddressBook))\\n#2 \\\/PATH_TOcloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(1053): Sabre\\\\DAV\\\\Server->emit('propFind', Array)\\n#3 \\\/PATH_TOcloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(979): Sabre\\\\DAV\\\\Server->getPropertiesByNode(Object(Sabre\\\\DAV\\\\PropFind), Object(OCA\\\\DAV\\\\CardDAV\\\\AddressBook))\\n#4 \\\/PATH_TOcloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(1649): Sabre\\\\DAV\\\\Server->getPropertiesIteratorForPath('addressbooks\\\/us...', Array, 1)\\n#5 \\\/PATH_TOcloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(363): Sabre\\\\DAV\\\\Server->generateMultiStatus(Object(Generator), false)\\n#6 \\\/PATH_TOcloud\\\/lib\\\/composer\\\/sabre\\\/event\\\/lib\\\/WildcardEmitterTrait.php(96): Sabre\\\\DAV\\\\CorePlugin->httpPropFind(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#7 \\\/PATH_TOcloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(464): Sabre\\\\DAV\\\\Server->emit('method:PROPFIND', Array)\\n#8 \\\/PATH_TOcloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(241): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#9 \\\/PATH_TOcloud\\\/apps\\\/dav\\\/lib\\\/Server.php(326): Sabre\\\\DAV\\\\Server->start()\\n#10 \\\/PATH_TOcloud\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(31): OCA\\\\DAV\\\\Server->exec()\\n#11 \\\/PATH_TOcloud\\\/remote.php(165): require_once('\\\/PATH_TOcloud...')\\n#12 {main}\",\"File\":\"\\\/PATH_TOcloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/CardDAV\\\/Plugin.php\",\"Line\":689}"}

It seems some one else has already reported this to the bugtracker of ownCloud at:

After following the links posted there i have found:

with a possible solution in:

After manually applied the changes done to the lib/CardDAV/Plugin.php of SabreDAV in https://github.com/sabre-io/dav/pull/1191/files which is located at my ownCloud installation at lib/composer/sabre/dav/lib/CardDAV/Plugin.php the error seems to disappear.

This looks to me like a good workaround until a new version of ownCloud 10.3 including an updated version of https://github.com/sabre-io/dav/releases/4.0.2 with a fix for this Bug in SabreDAV.

2 Likes