Uh oh!
There was an error while loading. Please reload this page.
fix: TypeError in DataCaster initialization - #9738
Conversation
neznaika0
commented
Oct 2, 2025
The two checks conflict. What is the best way to fix it? |
michalsn
commented
Oct 3, 2025
Do you think this exception is necessary? The PHPDoc already makes it clear. |
phpDoc will not help if the user uses a different method (in notepad++). |
michalsn
commented
Oct 3, 2025
I'm afraid I don't fully understand what you mean. Since this isn't directly used by the end user, I'd stick with the PHPDoc. It has worked fine so far - unless there's a specific reason for adding this check? |
neznaika0
commented
Oct 3, 2025
Sorry. Typo "translation". |
michalsn
commented
Oct 3, 2025
This exception was previously used in the entity cast. Let's hold off for now and hear what others think. If you feel it's more valuable to keep the exception and make the PHPDoc less strict, that's fine too. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
c3d4e15 to
cb3d4bfCompareDataCaster initializationTypeError in DataCaster initializationUh oh!
There was an error while loading. Please reload this page.
cb3d4bf to
36dbd61Compare36dbd61 to
e82e18fCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
paulbalandan
commented
Dec 11, 2025
Thank you, @neznaika0 |
Description
new DataCaster()caused the errorTypeError: array_merge(): Argument #2 must be of type array, null givencastAs()and a test.BaseCastChecklist: