MDL-69474 accessibility: page->url can be not set, protect against that
commit24c62a15c50857e1e05b5a41f8854530cee11667
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Mon, 15 Mar 2021 19:20:33 +0000 (15 20:20 +0100)
committerAdrian Greeve <abgreeve@gmail.com>
Tue, 16 Mar 2021 04:56:40 +0000 (16 12:56 +0800)
treefb0da88792f0abb7f9ea9d10c056dcc31d6ca4d0
parent3972a25d6a3a2785aa179c9f12e8e0d690b57b3a
MDL-69474 accessibility: page->url can be not set, protect against that

Both in unit tests, but also in other areas (say blocks, for example)
it's possible that page->url has not been set yet.

So, let's change current code to always check if we have something
(page->url) to compare.

Note the use of has_set_url() is needed, because page->url is magic
method and it doesn't work as expected. Hate magics!
lib/outputrenderers.php