<div dir="ltr">Hi <span style="font-family:arial,sans-serif;font-size:13px">Danny,</span><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Raised a ticket in tracker (</span><a href="http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/7947">http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/7947</a><span style="font-family:arial,sans-serif;font-size:13px">),Please follow up.</span></div>

</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 10, 2014 at 8:53 PM, Daniel Thompson <span dir="ltr"><<a href="mailto:developingdanny@gmail.com" target="_blank">developingdanny@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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 style="white-space:pre-wrap">                  </span>foreach($recordModels as $recordModel) {</div>
<div><span style="white-space:pre-wrap">                          </span>$result[] = array('label'=>decode_html($recordModel->getName()), 'value'=>decode_html($recordModel->getName()), 'id'=>$recordModel->getId());</div>


<div><span style="white-space:pre-wrap">                  </span>}</div><div><span style="white-space:pre-wrap">                </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 style="white-space:pre-wrap">                       </span>foreach($recordModels as $recordModel) {</div>


<div><span style="white-space:pre-wrap">                          </span>$result[] = array('label'=>decode_html($recordModel->getName()), 'value'=>decode_html($recordModel->getName()), 'id'=>$recordModel->getId());</div>


<div><span style="white-space:pre-wrap">                  </span>}</div><div><span style="white-space:pre-wrap">                </span>}</div></div><div>}</div><div><br></div><div>Regards,</div><div><br></div><div>Danny</div></div>
<br>_______________________________________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br>With<br>Best Regards<br>Uma.S<br>
</div>