<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:#0060bf;">Hi all,<br><br>I noticed something odd when I do a query with the new 5.6.1 version.<br><br>The getFeature method seems to return a NULL value, when it was working good before the new version update.<br><br>Here's the code:<br><font size="2"><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">$n = $map-&gt;numlayers;<br><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"></span><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">for ($i = 0; $i &lt; $n; $i++) {<br><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"></span><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; $theme =
 $map-&gt;GetLayer($i);<br>&nbsp;&nbsp;&nbsp; <br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"></span><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; if ($tema-&gt;isVisible()) {</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (($regs = $theme-&gt;getNumResults()) == 0) {</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; continue;</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }</span><br style="font-family: Courier
 New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; }</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; else {</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; continue;</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; }</span><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"></span><span style="font-family: Courier
 New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; $theme-&gt;open();&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; $values = $theme-&gt;getitems();</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; </span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; unset($atts);</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"></span><span style="font-family: Courier
 New,courier,monaco,monospace,sans-serif;"><br>&nbsp;&nbsp;&nbsp; for ($reg = 0; $reg &lt; $regs; $reg++) {</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"></span><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $result = $theme-&gt;getResult($reg);</span><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><br><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </span><span style="color: rgb(255, 0, 127); font-style: italic;">// getFeature is returning NULL with the 5.6.1 version</span></span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif; font-style: italic;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif; font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </span><span
 style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="color: rgb(255, 0, 127);">$element = $theme-&gt;getFeature($result-&gt;shapeindex, $result-&gt;tileindex);</span></span><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"></span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; for ($value = 0; $value &lt; count($values); $value++) {</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $atts[] = $values[$value] . " " . $element-&gt;values[$values[$value]];</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family:
 Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br><span style="color: rgb(255, 0, 127); font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // php crash because $element is a non object</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif; color: rgb(255, 0, 127); font-style: italic;"></span><span style="font-family: Courier New,courier,monaco,monospace,sans-serif; color: rgb(255, 0, 127); font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </span><span style="font-family: Courier New,courier,monaco,monospace,sans-serif; color: rgb(255, 0, 127);">$element-&gt;free();</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif; color: rgb(255, 0, 127);"><span
 style="font-family: Courier New,courier,monaco,monospace,sans-serif; color: rgb(255, 0, 127);"></span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"></span><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; }</span><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"></span><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; $theme-&gt;close();</span><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ...<br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier
 New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </span><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><br>}</span></font><br><br>Any help or idea will be appreciated.<br><br>Thanks in advance <br><br><div style="font-weight: bold;">IC Carlos Ruiz</div><div></div></div><br>

      </body></html>