nette / schema

📐 Validating data structures against a given Schema.
https://doc.nette.org/schema
Other
905 stars 26 forks source link

castTo: foreach() argument must be of type array|object, string given #58

Closed radimvaculik closed 1 year ago

radimvaculik commented 1 year ago

Version: 1.2.4

Bug Description

When calling castTo twice, it produces a warning.

Steps To Reproduce

https://fiddle.nette.org/nette/#d9bfa4be37

Expected Behavior

No warning. Input string will be successfully mapped to target class DateTime property.

Possible Solution

🤷

radimvaculik commented 1 year ago

Linking similar issue – https://github.com/nette/schema/issues/44