Skip to content

Commit

Permalink
Merge pull request #125 from gankbat/master
Browse files Browse the repository at this point in the history
Changed the default value of parameter $default of config() function to null
  • Loading branch information
huangzhhui committed Jul 4, 2019
2 parents 52845b6 + 3f3c4bc commit 4a74cf1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -7,6 +7,7 @@
# Changed

- [#124](https://github.com/hyperf-cloud/hyperf/pull/124) Added `$delay` parameter for `DriverInterface::push`, and marked `DriverInterface::delay` method to deprecated.
- [#125](https://github.com/hyperf-cloud/hyperf/pull/125) Changed the default value of parameter $default of config() function to null

# Fixed

Expand Down
2 changes: 1 addition & 1 deletion src/config/src/Functions.php
Expand Up @@ -14,7 +14,7 @@
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.');
Expand Down

0 comments on commit 4a74cf1

Please sign in to comment.