Skip to content

Commit

Permalink
Use configuration hasItem
Browse files Browse the repository at this point in the history
  • Loading branch information
bajb committed Oct 18, 2019
1 parent 57e9ccb commit 0059889
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"require": {
"php": ">=7.1",
"ext-json": "*",
"packaged/config": "~1.4",
"packaged/config": "~1.5",
"packaged/context": "~1.0",
"packaged/di-container": "~1.0",
"packaged/event": "~1.1",
Expand Down
2 changes: 1 addition & 1 deletion src/Console/Commands/BuiltInWebServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
if($this->port === null)
{
$this->port = $this->getContext()->config()->getItem('serve', 'port', 8888);
$this->useNextAvailablePort = !$this->getContext()->config()->getSection('serve')->has('port');
$this->useNextAvailablePort = !$this->getContext()->config()->hasItem('serve', 'port');
}

if($this->useNextAvailablePort)
Expand Down

0 comments on commit 0059889

Please sign in to comment.