Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syntax error in CalDavBackend.php and CardDavBackend.php #31786

Closed
cscheiber opened this issue Jun 14, 2018 · 5 comments
Closed

syntax error in CalDavBackend.php and CardDavBackend.php #31786

cscheiber opened this issue Jun 14, 2018 · 5 comments

Comments

@cscheiber
Copy link

OwnCloud 10.0.8.5, Community Edition
Calendar App 1.5.7
Contacts App 1.5.4
Hosted at 1&1, PHP version 7.2 (same issue for 7.1 and 7.0)
Jobs are executed via Cron-Job

PHP.INI from 1&1:

  • PHP 7.2
  • Zend Framework v3.2.0

After the upgrade the cron job started to fail and to report the following PHP syntax error (without any code modification of course):

"message":"syntax error, unexpected '.' at ..... oc/apps/dav/lib/CardDAV/CardDavBackend.php#498"}
later (after a manual fix) also this
"message":"syntax error, unexpected '.' at ...... oc/apps/dav/lib/CalDAV/CalDavBackend.php#806"}

In both cases the last line of public function getMultipleCards and getMultipleCalendarObjects

public function getMultipleCards($addressBookId, array $uris) {

    return \array_merge(...$results);
}

I am not a PHP expert, but I replaced the line in both cases like shown here

public function getMultipleCards($addressBookId, array $uris) {

    return call_user_func_array('array_merge', $results);
}

Now it works, but ... probably I did not hit these lines as the data volume is smaller than the allowed chunk size 998 (?)

I thought it would be important enough to bring it directly up as issue here.

@ownclouders
Copy link
Contributor

GitMate.io thinks the contributor most likely able to help you is @DeepDiver1975.

Possibly related issues are #26902 (error), #28840 (-Error-), #29082 (a Error), #20506 (Error PHP (appframework)), and #3699 (Fatal PHP Error).

@phil-davis
Copy link
Contributor

phil-davis commented Jun 14, 2018

That change happened in b06fe9e#diff-ded00a57c79a474ac4c4b43c620d6050R806

What is that (...$x) syntax?

@DeepDiver1975 maybe you can educate us.

@DeepDiver1975
Copy link
Member

What is that (...$x) syntax?

splat operator - part of the syntax since 5.6 - http://php.net/manual/en/migration56.new-features.php

@cscheiber
Copy link
Author

Knowing this, I contacted 1&1 support. And it turns out, even if in the WebSpace PHP 7.2.5 is used (and recommended) all cron jobs still run with PHP 5.4 in the environment! They are working on that.

Might be a problem for each OC instance at 1&1 Web-Hosting using cron.

@lock
Copy link

lock bot commented Jul 30, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants