MDL-59467 core: Use hasHelper instead of catching exception
commit0a7c58fd8f8f272147f119d8729c82958f63b0ba
authorAndrew Nicols <andrew@nicols.co.uk>
Tue, 19 Dec 2023 01:13:53 +0000 (19 09:13 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Tue, 19 Dec 2023 01:13:53 +0000 (19 09:13 +0800)
tree2d91eb03284bfff4d3b5bc47612215e25ff79f23
parent513f3b02c76e0321b3c57ca8014d3100b4da8d94
MDL-59467 core: Use hasHelper instead of catching exception

When xdebug is set to break on exceptions it stops on all exceptions,
including _caught_ exceptions.

As a result we regularly hit this uniqid helper issue if debugging with
xdebug.

The solution is to check if the helper exists using the hasHelper method
instead of catching an exception when it does not exist.
lib/outputrenderers.php