sabre-io / Baikal

Baïkal is a Calendar+Contacts server
https://sabre.io/baikal/
GNU General Public License v3.0
2.44k stars 282 forks source link

ErrorException: Creation of dynamic property #1205

Closed opa-rudi closed 10 months ago

opa-rudi commented 10 months ago

I am getting a 500 error when syncing the addressbook with DAVX5

Apache log: ErrorException: Creation of dynamic property Sabre\CardDAV\Xml\Request\AddressBookMultiGetReport::$addressDataProperties is deprecated in /var/www/baikal/vendor/sabre/dav/lib/CardDAV/Xml/Request/AddressBookMultiGetReport.php:104

There should be some updates in the code to get to work with PHP 8.2

opa-rudi commented 10 months ago

Complete Log:

HTTP REQUEST Request{method=REPORT, url=https://baikal.vpn:1005/dav.php/addressbooks/mustermann/default/, headers=[Depth:0, User-Agent:DAVx5/4.3.7-ose (2023/09/28; dav4jvm; okhttp/4.11.0) Android/12, Accept-Language:de-DE, de;q=0.7, *;q=0.5]} <?xml version='1.0' encoding='UTF-8' ?>/dav.php/addressbooks/mustermann/default/f1a673bb-0b84-428e-b5cd-5dd1125ebaa9.vcf</CARD:addressbook-multiget>

HTTP RESPONSE Response{protocol=http/1.1, code=500, message=Internal Server Error, url=https://baikal.vpn:1005/dav.php/addressbooks/mustermann/default/} <?xml version="1.0" encoding="utf-8"?> 4.3.1</s:sabredav-version> ErrorException</s:exception> Creation of dynamic property Sabre\CardDAV\Xml\Request\AddressBookMultiGetReport::$addressDataProperties is deprecated</s:message> </d:error>

Yenya commented 10 months ago

Hello, I have the same problem with Baikal 0.9.3 and DavX5, PHP 8.2.10 on Fedora 38. Other clients work OK (e.g. Evolution).

This issue is closed, but has no fix attached. What can I do to fix this problem? Thanks!

opa-rudi commented 10 months ago

Try this. That did the trick for me.

https://github.com/sabre-io/Baikal/issues/1154#issuecomment-1427028654

Yenya commented 10 months ago

Thanks, this fixed the problem for me:

--- vendor/sabre/dav/lib/CardDAV/Xml/Request/AddressBookMultiGetReport.php.dist2023-10-12 09:09:58.083036100 +0200
+++ vendor/sabre/dav/lib/CardDAV/Xml/Request/AddressBookMultiGetReport.php  2023-10-12 09:10:53.924329704 +0200
@@ -53,6 +53,8 @@
      */
     public $version = null;

+    public $addressDataProperties;
+
     /**
      * The deserialize method is called during xml parsing.
      *