Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit119af3c

Browse files
committed
[Console] Fix Application::getSignalRegistry() retval
1 parentabbb3d0 commit119af3c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/Symfony/Component/Console/Application.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public function setCommandLoader(CommandLoaderInterface $commandLoader)
108108
$this->commandLoader =$commandLoader;
109109
}
110110

111-
publicfunctiongetSignalRegistry():SignalRegistry
111+
publicfunctiongetSignalRegistry():?SignalRegistry
112112
{
113113
return$this->signalRegistry;
114114
}
@@ -282,7 +282,7 @@ public function doRun(InputInterface $input, OutputInterface $output)
282282
$command =$this->find($alternative);
283283
}
284284

285-
if ($this->dispatcher) {
285+
if ($this->dispatcher &&$this->signalRegistry) {
286286
foreach ($this->signalsToDispatchEventas$signal) {
287287
$event =newConsoleSignalEvent($command,$input,$output,$signal);
288288

@@ -954,7 +954,7 @@ protected function doRunCommand(Command $command, InputInterface $input, OutputI
954954
}
955955

956956
if ($commandinstanceof SignalableCommandInterface) {
957-
if (!$this->signalsToDispatchEvent) {
957+
if (!$this->signalRegistry) {
958958
thrownewRuntimeException('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.');
959959
}
960960
foreach ($command->getSubscribedSignals()as$signal) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp