mirror of
https://github.com/moodle/moodle.git
synced 2025-04-15 21:45:37 +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
@ -722,7 +722,7 @@ class page_requirements_manager {
|
||||
}
|
||||
// The URL is not a Moodle resource.
|
||||
return $url;
|
||||
} else if (strpos($url, '/') === 0) {
|
||||
} else if (null !== $url && strpos($url, '/') === 0) {
|
||||
// Fix the admin links if needed.
|
||||
if ($CFG->admin !== 'admin') {
|
||||
if (strpos($url, "/admin/") === 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user