Update Functions.php

set default to null
This commit is contained in:
gankbat 2019-07-04 20:07:15 +08:00 committed by GitHub
parent ff23e16d59
commit fcd5b1e193
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,7 +14,7 @@ use Hyperf\Contract\ConfigInterface;
use Hyperf\Utils\ApplicationContext;
if (! function_exists('config')) {
function config(string $key, $default)
function config(string $key, $default = null)
{
if (! ApplicationContext::hasContainer()) {
throw new \RuntimeException('The application context lacks the container.');