-
Bug
-
Resolution: Fixed
-
Minor
-
4.1.5
-
MOODLE_401_STABLE
-
MOODLE_401_STABLE, MOODLE_402_STABLE
-
MDL-79370-401 -
-
1
-
Team Hedgehog 2023 Sprint 3.2
When a not authentifaced user try to access to a user profile they've an error
AH01071: Got error 'PHP message: PHP Notice: This page did not call $PAGE->set_url(...).
the bug is in the file /user/profile.php at these point
if (isguestuser()) {
$PAGE->set_context(context_system::instance());
echo $OUTPUT->header();
To solve it I move these lines
$userid = $userid ? $userid : $USER->id; // Owner of the page.
// Even if the user didn't supply a userid, we treat page URL as if they did; this is needed
// so navigation works correctly.
$PAGE->set_url('/user/profile.php', ['id' => $userid]);
to line (before the sguestuser()) 45.