Project: moodle
Issue MDL-43746: require_course_login: incorrect variable assignment
In function *require_course_login* (/lib/moodlelib.php) $issite is never true if parameter $courseorid is not an object. {code}$issite = (is_object($courseorid) and $courseorid->id == SITEID) or (!is_object($courseorid) and $courseorid == SITEID);{code} is not working correctly because = has a higher precedence than and/or in PHP. It should be: {code}$issite = (is_object($courseorid) && $courseorid->id == SITEID) || (!is_object($courseorid) && $courseorid == SITEID);{code}
Story points: 2