warner
This commit is contained in:
parent
d3737c7a66
commit
9d9532a215
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user