From 165709ff7dfbdfa24cf0e614b92a434791054707 Mon Sep 17 00:00:00 2001 From: ferranrecio Date: Fri, 17 May 2024 10:38:01 +0200 Subject: [PATCH] MDL-81948 theme: fix fallback layout logic Finding the page layout fallback was trying to get a default layout from the ancient theme called "base". This default theme do not exists anymore and defining a wrong layout in a theme is a code mistake that should not be bypassed. --- lib/outputlib.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/outputlib.php b/lib/outputlib.php index 3fdc780118d..2925074bbcc 100644 --- a/lib/outputlib.php +++ b/lib/outputlib.php @@ -2499,9 +2499,7 @@ class theme_config { } } - debugging('Can not find layout file for: ' . $pagelayout); - // fallback to standard normal layout - return "$CFG->dirroot/theme/base/layout/general.php"; + throw new coding_exception('Can not find layout file for: ' . $pagelayout . ' (' . $layoutfile . ')'); } /**