Skip to content

Commit

Permalink
[BUGFIX] Set correct return type for CommandRegistry::getCommandByIde…
Browse files Browse the repository at this point in the history
…ntifier

The method `getCommandByIdentifier` can return `null`, therefore the
return type must be adjusted.

Resolves: #92313
Releases: 10.4, 9.5
Change-Id: I15b272ae922fb86012fe6412b767e5d83436a6ae
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/65757
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Oliver Bartsch <bo@cedev.de>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Oliver Bartsch <bo@cedev.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
  • Loading branch information
georgringer authored and maddy2101 committed Sep 18, 2020
1 parent 44bb3fe commit 9ed135c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions typo3/sysext/core/Classes/Console/CommandRegistry.php
Expand Up @@ -158,9 +158,9 @@ public function getLegacyCommands(): \Generator
* @param string $identifier
* @throws CommandNameAlreadyInUseException
* @throws UnknownCommandException
* @return Command
* @return Command|null
*/
public function getCommandByIdentifier(string $identifier): Command
public function getCommandByIdentifier(string $identifier): ?Command
{
$this->populateCommandsFromPackages();

Expand Down

0 comments on commit 9ed135c

Please sign in to comment.