Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9b30b94

Browse files
committed
[Console] Fix fatal error when accessing Application::signalRegistry without pcntl
1 parent a1da6ff commit 9b30b94

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Console/Application.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function setCommandLoader(CommandLoaderInterface $commandLoader)
120120

121121
public function getSignalRegistry(): SignalRegistry
122122
{
123-
if (!$this->signalRegistry) {
123+
if (!isset($this->signalRegistry)) {
124124
throw new RuntimeException('Signals are not supported. Make sure that the `pcntl` extension is installed and that "pcntl_*" functions are not disabled by your php.ini\'s "disable_functions" directive.');
125125
}
126126

@@ -1004,7 +1004,7 @@ protected function doRunCommand(Command $command, InputInterface $input, OutputI
10041004
$commandSignals = $command instanceof SignalableCommandInterface ? $command->getSubscribedSignals() : [];
10051005

10061006
if ($commandSignals || null !== $this->dispatcher) {
1007-
if (!$this->signalRegistry) {
1007+
if (!isset($this->signalRegistry)) {
10081008
throw new RuntimeException('Unable to subscribe to signal events. Make sure that the `pcntl` extension is installed and that "pcntl_*" functions are not disabled by your php.ini\'s "disable_functions" directive.');
10091009
}
10101010

0 commit comments

Comments
 (0)