This commit is contained in:
Shish 2020-01-26 17:47:41 +00:00
parent d3737c7a66
commit 9d9532a215

View file

@ -214,7 +214,7 @@ abstract class BaseConfig implements Config
public function get_string(string $name, ?string $default=null): ?string
{
$val = $this->get($name, $default);
if(!is_string($val)) throw new SCoreException("$name is not a string: $val");
if(!is_string($val) && !is_null($val)) throw new SCoreException("$name is not a string: $val");
return $val;
}