open-lms-open-source / moodle-mod_lightboxgallery

Lightbox Gallery resource module for Moodle 2.0
GNU General Public License v3.0
30 stars 37 forks source link

Error in Recent activity - Strict Standards: Only variables should be assigned by reference ... #65

Closed s-cenni closed 9 years ago

s-cenni commented 10 years ago

When I click on "Recent activity" I get the following error:

Strict Standards: Only variables should be assigned by reference in ****/mod/lightboxgallery/lib.php on line 221

I guess the solution is to remove & in this statement: $modinfo = & get_fast_modinfo($course); because I think we can apply here this: "As of PHP 5, the new operator returns a reference automatically, so assigning the result of new by reference results in an E_DEPRECATED message in PHP 5.3 and later, and an E_STRICT message in earlier versions." (from: http://php.net/manual/en/language.operators.assignment.php)

aolley commented 9 years ago

From the git history, this was fixed in the Moodle 2.7 version of the plugin.

You can safely remove the ampersand in front of get_fast_modinfo on that line if you're using an older version.