Project

General

Profile

Actions

Bug #88848

closed

Cannot set null as targetPage in UriBuilder

Added by Robert Vock almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2019-07-26
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

#87629 hardened the UriBuilder of Extbase. Since then it is not possible to set null as targetPageUid, even though the comment for the property says null is allowed:
UriBuilder.php#L102


/**
 * @var int|null
 */
protected $targetPageUid;

UriBuilder.php#L426


public function setTargetPageUid(int $targetPageUid): UriBuilder
{
    $this->targetPageUid = $targetPageUid;
    return $this;
}

Other methods which do not allow null:
- setRequest
- setArgumentPrefix

The argument type hint should be adjusted and allow null: ?int, ?Request and ?string

Actions

Also available in: Atom PDF