Class "Object" not found

Class "Object" not found

Michael Rice發表於
Number of replies: 2

Recently I upgraded from moodle 3.3.1 to 3.4 and php to 7.0. After the update cron stopped working.  I am getting the error Class "Object" not found from my SSO module. I am using moodle-drupalservices as an SSO between our drupal site and moodle. The code that is throwing the error is $user = new object(); in auth.php. The comment right above the code is "// build the new user object to be put into the Moodle database".

Any ideas on how to fix the error?

評比平均分數: -
In reply to Michael Rice

Re: Class "Object" not found

Dan Marsden發表於
Core developers的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片 Plugins guardians的相片 Testers的相片 Translators的相片

it's due to your upgrade to PHP 7  - google would probably help but you should be able to change "object()" to "stdclass()" - but you may run into other issues with 3rd party code that isn't supported well.

In reply to Dan Marsden

Re: Class "Object" not found

Michael Rice發表於

Thanks! I wasn't sure if it was the moodle or php update that broke the code.  I will look into stdclass() and make a note in the github repo.