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

PHP 7 "new object();" breaks moodle cron #80

Open
ocitguy opened this issue Nov 21, 2017 · 1 comment
Open

PHP 7 "new object();" breaks moodle cron #80

ocitguy opened this issue Nov 21, 2017 · 1 comment

Comments

@ocitguy
Copy link
Contributor

ocitguy commented Nov 21, 2017

I have been struggling with this for the past few days and finally have, I think, it fixed on my system. Moodle 3.4 necessitates updating to PHP 7. In PHP 7's documentation it says that "New objects cannot be assigned by reference", which I think is done in the auth.php script line 170. As per a post on Moodle's forum I changed object(); to stdclass(); and new drupal users were synced with Moodle. I don't know enough PHP to determine if there are any repercussions other than finally being able to sync new users.

@tebyx
Copy link

tebyx commented Nov 28, 2018

Is the plugin and synchronization working after the change you have outlined? I'm currently running moodle 3.3 with PHP 5.6, but I will need to upgrade to moodle 3.4 o 3.5 in the future, so Iwould like to maintain the functionality provided by the moodle-drupalservices plugin, but I couldn't make it work with PHP 7 as is...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants