TYPO3 Exception 1546632293¶
Note
Below, the TYPO3 community may have provided additional information or solutions for this exception. However, these may or may not apply to your particular case. If you can provide more information, you should come back here and add your experience and solution steps to this issue once you have resolved it.
General TYPO3 troubleshooting tips can be found in the section “Troubleshooting” of the menu, and live support is available in the TYPO3 Slack channel #typo3-cms.
To add your experience, click “Edit on GitHub” above and follow the “Edit on GitHub” workflow. Also check out our tip on Coding Style and reST.
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 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;