Closed lyrixx closed 5 months ago
My property
public ?array $descriptionList = null;
The generated code:
if (null !== ($context['groups'] ?? array()) && array_intersect($context['groups'] ?? array(), array('crawl_url/clickhouse', 'crawl_url/read'))) { $values = array(); foreach ($value->descriptionList as $key => $value_16) { $values[] = $value_16; } $result['descriptionList'] = $values; }
The error
In Symfony_Mapper_AppBundle_Api_Dto_Crawl_CrawlUrl_array.php line 142: [ErrorException] Warning: foreach() argument must be of type array|object, null given
Nevermind, There is a typo in my code:
/** @var array<string> */ public ?array $descriptionList = null;
Sorry for the noise !
My property
The generated code:
The error