<div dir="ltr">Hi All,<div><br></div><div>Ran into this within my dev enviroment</div><div><br></div><div><div>foreach($records as $moduleName=>$recordModels) {</div><div><span class="" style="white-space:pre"> </span>foreach($recordModels as $recordModel) {</div>
<div><span class="" style="white-space:pre"> </span>$result[] = array('label'=>decode_html($recordModel->getName()), 'value'=>decode_html($recordModel->getName()), 'id'=>$recordModel->getId());</div>
<div><span class="" style="white-space:pre"> </span>}</div><div><span class="" style="white-space:pre"> </span>}</div></div><div><br></div><div>returns an error if no results are returned due to $records is not being checked before emit.</div>
<div><br></div><div><br></div><div>Should be something like this.</div><div><br></div><div>if(is_array($records))</div><div>{</div><div><div>foreach($records as $moduleName=>$recordModels) {</div><div><span class="" style="white-space:pre"> </span>foreach($recordModels as $recordModel) {</div>
<div><span class="" style="white-space:pre"> </span>$result[] = array('label'=>decode_html($recordModel->getName()), 'value'=>decode_html($recordModel->getName()), 'id'=>$recordModel->getId());</div>
<div><span class="" style="white-space:pre"> </span>}</div><div><span class="" style="white-space:pre"> </span>}</div></div><div>}</div><div><br></div><div>Regards,</div><div><br></div><div>Danny</div></div>