warner
This commit is contained in:
parent
d3737c7a66
commit
9d9532a215
1 changed files with 1 additions and 1 deletions
|
@ -214,7 +214,7 @@ abstract class BaseConfig implements Config
|
||||||
public function get_string(string $name, ?string $default=null): ?string
|
public function get_string(string $name, ?string $default=null): ?string
|
||||||
{
|
{
|
||||||
$val = $this->get($name, $default);
|
$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;
|
return $val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue