This commit is contained in:
Shish 2020-01-26 17:43:39 +00:00
parent 06fffd6328
commit d3737c7a66

View file

@ -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