From 0abaa301c3b84f356842f9b45362600ec7937415 Mon Sep 17 00:00:00 2001 From: Pavel Shevaev Date: Tue, 12 Mar 2024 19:16:51 +0300 Subject: [PATCH] Improving exception message --- config.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.inc.php b/config.inc.php index 64b787f..0865cf9 100644 --- a/config.inc.php +++ b/config.inc.php @@ -1028,7 +1028,7 @@ function config_load_ex(string $conf_dir, string $file, array $arr, ?int $id = n throw new Exception("No such class '$klass'"); $cnf = new $klass; if(!is_a($cnf, $GLOBALS['CONFIG_BASE_CLASS'])) - throw new Exception("Class '$klass' must inherit from '{$GLOBALS['CONFIG_BASE_CLASS']}'"); + throw new Exception("'$klass' is not subclass of '".ltrim($GLOBALS['CONFIG_BASE_CLASS'], '\\')."'"); $cnf->import($arr, true); }