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/+/65775
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
  • Loading branch information
georgringer authored and maddy2101 committed Sep 18, 2020
1 parent bd43780 commit 922d4dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions typo3/sysext/core/Classes/Console/CommandRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ public function getSchedulableCommands(): \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 922d4dd

Please sign in to comment.