From d3737c7a66530be2d671aa3450f2df47980b2658 Mon Sep 17 00:00:00 2001 From: Shish Date: Sun, 26 Jan 2020 17:43:39 +0000 Subject: [PATCH] warner --- core/config.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/config.php b/core/config.php index a51aebbc..5804dcab 100644 --- a/core/config.php +++ b/core/config.php @@ -213,7 +213,9 @@ abstract class BaseConfig implements Config public function get_string(string $name, ?string $default=null): ?string { - return $this->get($name, $default); + $val = $this->get($name, $default); + if(!is_string($val)) throw new SCoreException("$name is not a string: $val"); + return $val; } public function get_bool(string $name, ?bool $default=null): ?bool