mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-76362 output: Preserve original behaviour for PHP 8.1
Whenever the page_requirements_manager::js_fix_url() is called with null url, it must throw an exception and emit 0 warnings. It's covered by an explicit test: test_js_fix_url_coding_exception with data set "Provide a null argument"
This commit is contained in:
parent
7000a99de3
commit
4a76c772d7
1 changed files with 1 additions and 1 deletions
|
@ -722,7 +722,7 @@ class page_requirements_manager {
|
||||||
}
|
}
|
||||||
// The URL is not a Moodle resource.
|
// The URL is not a Moodle resource.
|
||||||
return $url;
|
return $url;
|
||||||
} else if (strpos($url, '/') === 0) {
|
} else if (null !== $url && strpos($url, '/') === 0) {
|
||||||
// Fix the admin links if needed.
|
// Fix the admin links if needed.
|
||||||
if ($CFG->admin !== 'admin') {
|
if ($CFG->admin !== 'admin') {
|
||||||
if (strpos($url, "/admin/") === 0) {
|
if (strpos($url, "/admin/") === 0) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue