fix: TypeError in DataCaster initialization#9738
fix: TypeError in DataCaster initialization#9738paulbalandan merged 4 commits intocodeigniter4:developfrom
TypeError in DataCaster initialization#9738Conversation
|
The two checks conflict. What is the best way to fix it? |
|
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++). |
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? |
|
Sorry. Typo "translation". |
|
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. |
c3d4e15 to
cb3d4bf
Compare
DataCaster initializationTypeError in DataCaster initialization
cb3d4bf to
36dbd61
Compare
36dbd61 to
e82e18f
Compare
|
Thank you, @neznaika0 |
Description
new DataCaster()caused the errorTypeError: array_merge(): Argument #2 must be of type array, null givencastAs()and a test.BaseCastChecklist: