.. include:: /Includes.rst.txt ========================== TYPO3 Exception 1546632293 ========================== .. include:: /If-you-encounter-this-exception.rst.txt TYPO3 10.4.14 - 2021-04-02 ========================== Situation --------- When validating a controller's argument, the following exception is thrown:: #1546632293 RuntimeException Could not get value of property "Site\Site\Domain\Model\Order::cart", make sure the property is either public or has a getter getCart(), a hasser hasCart() or an isser isCart(). But there is a :php:`public function getCart();` defined in the class. Solution -------- In Model, the property is nullable: :: protected ?Cart $cart; Add explicitly a default value: :: protected ?Cart $cart = null; `Read more information on this behaviour `__. TYPO3 11.5.31 - 2023-09-29 ========================== Situation --------- When validating a controller's argument, the following exception is thrown: .. code-block:: text #1546632293 RuntimeException Could not get value of property "Site\Site\Domain\Model\Booking::startdate", make sure the property is either public or has a getter getStartdate(), a hasser hasStartdate() or an isser isStartdate(). But there is a :php:`public function getStartdate(): DateTime` defined in the class. Solution -------- In the getter, the return value has to be nullable: :: public function getStartdate(): ?DateTime