<div dir="ltr">Hello everyone, <br><br>I have a problem with PHP Mapscript. When I add or remove some metadatas, sometimes metadatas are removed without reasons. <br>For instance, I have a metadata &quot;description&quot;, and when I do &quot;$oLayer-&gt;removeMetaData(&#39;toto&#39;);&quot;or "$oLayer-&gt;setMetaData('toto', 'titi');", the metadata description is deleted, but not always, sometimes.<br>
<br>Is there an issue ?<br>Is this a known bug ?<br><br>I had to use a hack like this to avoid this problem :<br><br>// I save my metadata Description<br>$szLayer = $oLayer-&gt;getMetaData(&#39;DESCRIPTION&#39;);<br><br>// i remove metadatas<br>
if($oLayer-&gt;getMetaData(&#39;REPORT_BIRT&#39;) != &#39;&#39;) {<br>$oLayer-&gt;removeMetaData(&#39;REPORT_BIRT&#39;);<br>}<br>if($oLayer-&gt;getMetaData(&#39;ID_BIRT&#39;) != &#39;&#39;) {<br>$oLayer-&gt;removeMetaData(&#39;ID_BIRT&#39;);<br>
}<br>if($oLayer-&gt;getMetaData(&#39;OUTPUT_BIRT&#39;) != &#39;&#39;) {<br>$oLayer-&gt;removeMetaData(&#39;OUTPUT_BIRT&#39;);<br>}<br><br>// i save metadata to avoid the strange remove that happens sometimes<br>$oLayer-&gt;setMetaData(&quot;DESCRIPTION&quot;, $szLayer);<br>
$oMap-&gt;save($szPathMap);<br><br>Thanks a lot<br><br></div>