Validate $key argument with empty instead with is_null

This commit is contained in:
Alex Tselegidis 2021-10-23 13:10:09 +02:00
parent 31c324dd92
commit b14341c328

View file

@ -34,7 +34,7 @@ function config($key, $default = NULL)
/** @var EA_Controller $CI */ /** @var EA_Controller $CI */
$CI = &get_instance(); $CI = &get_instance();
if (is_null($key)) if (empty($key))
{ {
throw new InvalidArgumentException('The $key argument cannot be empty.'); throw new InvalidArgumentException('The $key argument cannot be empty.');
} }