Skip to content

Commit defe8ef

Browse files
committed
[TASK] Fix method return in Nimut\Hellurl\UriGeneratorAndResolver
1 parent 9e3c471 commit defe8ef

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

Classes/UriGeneratorAndResolver.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -946,17 +946,15 @@ protected function fetchPagesForPath($url)
946946
* @param int $startPid Page id in which to search subpages matching first part of urlParts
947947
* @param string $mpvar MP variable string
948948
* @param array $urlParts Segments of the virtual path (passed by reference; items removed)
949-
* @param array|string $currentIdMp Array with the current pid/mpvar to return if no processing is done.
949+
* @param array|null $currentIdMp Array with the current pid/mpvar to return if no processing is done.
950950
* @param bool $foundUID
951951
*
952952
* @return array With resolved id and $mpvar
953953
*/
954-
protected function findIDBySegment($startPid, $mpvar, array &$urlParts, $currentIdMp = '', $foundUID = false)
954+
protected function findIDBySegment($startPid, $mpvar, array &$urlParts, $currentIdMp = null, $foundUID = false)
955955
{
956956
// Creating currentIdMp variable if not set
957-
if (!is_array($currentIdMp)) {
958-
$currentIdMp = array($startPid, $mpvar, $foundUID);
959-
}
957+
$currentIdMp = ($currentIdMp !== null) ? $currentIdMp : array($startPid, $mpvar, $foundUID);
960958

961959
// No more urlparts? Return what we have.
962960
if (count($urlParts) == 0) {

0 commit comments

Comments
 (0)