Skip to content

Commit 41e65ad

Browse files
committed
BrowseLocationsCommand.php: Cast locationId arg to int
PHP Fatal error: Uncaught TypeError: Ibexa\Core\Repository\SiteAccessAware\LocationService::loadLocation(): Argument #1 ($locationId) must be of type int, string given, called in /var/www/html/src/Command/BrowseLocationsCommand.php on line 45 and defined in /var/www/html/vendor/ibexa/core/src/lib/Repository/SiteAccessAware/LocationService.php:53
1 parent 4c9be9c commit 41e65ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

code_samples/api/public_php_api/src/Command/BrowseLocationsCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ private function browseLocation(Location $location, OutputInterface $output, int
4040

4141
protected function execute(InputInterface $input, OutputInterface $output): int
4242
{
43-
$locationId = $input->getArgument('locationId');
43+
$locationId = (int) $input->getArgument('locationId');
4444

4545
$location = $this->locationService->loadLocation($locationId);
4646
$this->browseLocation($location, $output);

0 commit comments

Comments
 (0)