<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 129: Add guard for report checkboxes "fields" &amp; "options"</title><link>https://sourceforge.net/p/issue-tracker/bugs/129/</link><description>Recent changes to 129: Add guard for report checkboxes "fields" &amp; "options"</description><atom:link href="https://sourceforge.net/p/issue-tracker/bugs/129/feed.rss" rel="self"/><language>en</language><lastBuildDate>Tue, 02 Aug 2005 18:34:23 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/issue-tracker/bugs/129/feed.rss" rel="self" type="application/rss+xml"/><item><title>Add guard for report checkboxes "fields" &amp; "options"</title><link>https://sourceforge.net/p/issue-tracker/bugs/129/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Group : 4.0.4&lt;/p&gt;
&lt;p&gt;The phperror file lists errors relating to "in_array"&lt;br /&gt;
having wrong parameter type when called with "fields"&lt;br /&gt;
and "options" in the reports page.  This would occur&lt;br /&gt;
when none of the fields or none of the options is&lt;br /&gt;
checked, as is the case for a new report.&lt;/p&gt;
&lt;p&gt;The simple fix is to add a guard&lt;br /&gt;
"defined($smarty.post.options)" before using the&lt;br /&gt;
in_array function.&lt;/p&gt;
&lt;p&gt;diff -r themes/default/tpl/reports/client.tpl&lt;br /&gt;
/var/www/html/issue-tracker/themes/default/tpl/reports/client.tpl&lt;br /&gt;
51c51&lt;br /&gt;
&amp;lt; &amp;lt;td width="25%" style="border: none;"&amp;gt;&amp;lt;input&lt;br /&gt;
type="checkbox" name="fields[]" value="{$field}"{if&lt;br /&gt;
in_array($field,$smarty.post.fields)}&lt;br /&gt;
checked="checked"{/if} /&amp;gt;{$text}&amp;lt;/td&amp;gt;&lt;br /&gt;
---&lt;br /&gt;
&amp;gt; &amp;lt;td width="25%" style="border: none;"&amp;gt;&amp;lt;input&lt;br /&gt;
type="checkbox" name="fields[]" value="{$field}"{if&lt;br /&gt;
defined($smarty.post.fields) &amp;amp;&amp;amp;&lt;br /&gt;
in_array($field,$smarty.post.fields)}&lt;br /&gt;
checked="checked"{/if} /&amp;gt;{$text}&amp;lt;/td&amp;gt;&lt;br /&gt;
72c72&lt;br /&gt;
&amp;lt; &amp;lt;td width="25%" style="border: none;"&amp;gt;&amp;lt;input&lt;br /&gt;
type="checkbox" name="options[]" value="{$option}"{if&lt;br /&gt;
in_array($option,$smarty.post.options)}&lt;br /&gt;
checked="checked"{/if} /&amp;gt;{$text}&amp;lt;/td&amp;gt;&lt;br /&gt;
---&lt;br /&gt;
&amp;gt; &amp;lt;td width="25%" style="border: none;"&amp;gt;&amp;lt;input&lt;br /&gt;
type="checkbox" name="options[]" value="{$option}"{if&lt;br /&gt;
defined($smarty.post.options) &amp;amp;&amp;amp;&lt;br /&gt;
in_array($option,$smarty.post.options)}&lt;br /&gt;
checked="checked"{/if} /&amp;gt;{$text}&amp;lt;/td&amp;gt;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Joël Larose</dc:creator><pubDate>Tue, 02 Aug 2005 18:34:23 -0000</pubDate><guid>https://sourceforge.net7b0ef3965518722cf43b2117417f862f3189227a</guid></item></channel></rss>