<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: sfWidgetFormInputCheckbox unchecked bug</title>
	<atom:link href="http://www.devexp.eu/2009/04/23/sfwidgetforminputcheckbox-unchecked-bug/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.devexp.eu/2009/04/23/sfwidgetforminputcheckbox-unchecked-bug/</link>
	<description>DEVelopment EXPerience, shared with the world!</description>
	<lastBuildDate>Thu, 06 Oct 2011 09:32:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Munguis</title>
		<link>http://www.devexp.eu/2009/04/23/sfwidgetforminputcheckbox-unchecked-bug/comment-page-1/#comment-7166</link>
		<dc:creator>Munguis</dc:creator>
		<pubDate>Wed, 17 Aug 2011 17:40:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.devexp.eu/?p=681#comment-7166</guid>
		<description>You can always set the default value to false:

&lt;code&gt;
if($this-&gt;isNew())
    $this-&gt;setDefault(&#039;field&#039;, false);
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>You can always set the default value to false:</p>
<p><code><br />
if($this-&gt;isNew())<br />
    $this-&gt;setDefault('field', false);<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pete Program</title>
		<link>http://www.devexp.eu/2009/04/23/sfwidgetforminputcheckbox-unchecked-bug/comment-page-1/#comment-7162</link>
		<dc:creator>Pete Program</dc:creator>
		<pubDate>Thu, 16 Jun 2011 13:06:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.devexp.eu/?p=681#comment-7162</guid>
		<description>Thanks for this - it took me hours..... and seconds to resolve with you work around</description>
		<content:encoded><![CDATA[<p>Thanks for this &#8211; it took me hours&#8230;.. and seconds to resolve with you work around</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Skyblue</title>
		<link>http://www.devexp.eu/2009/04/23/sfwidgetforminputcheckbox-unchecked-bug/comment-page-1/#comment-7159</link>
		<dc:creator>Skyblue</dc:creator>
		<pubDate>Mon, 02 May 2011 07:18:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.devexp.eu/?p=681#comment-7159</guid>
		<description>Why it is not working for me?

When I try to edit a data which I had checked last time, the checkbox is unchecked.</description>
		<content:encoded><![CDATA[<p>Why it is not working for me?</p>
<p>When I try to edit a data which I had checked last time, the checkbox is unchecked.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Small</title>
		<link>http://www.devexp.eu/2009/04/23/sfwidgetforminputcheckbox-unchecked-bug/comment-page-1/#comment-7152</link>
		<dc:creator>Dave Small</dc:creator>
		<pubDate>Fri, 18 Mar 2011 11:00:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.devexp.eu/?p=681#comment-7152</guid>
		<description>Hi all.

I&#039;m just moving from my own self-rolled MVC Framework to Symfony, and find it hard to believe that this bug has still not been fixed (v1.4.9).

It makes no sense to me to have a checkbox which only appears &#039;unchecked&#039; when the underlying data is null or boolean &#039;false&#039;. Under MySQL, the value of zero (0) is often used to represent &#039;false&#039; in a TINYINT(1) field.

Changing symfony/lib/widget/sfWidgetFormInputCheckbox.class.php from:

&lt;code&gt;
if (null !== $value &amp;&amp; $value !== false)
&lt;/code&gt;

to 

&lt;code&gt;
if (null !== $value &amp;&amp; $value !== false &amp;&amp; $value !== 0)
&lt;/code&gt;

seems to fix this problem in an uncontroversial way... so I wonder why this hasn&#039;t been adopted as a fix...?

Thanks for the page - was useful for me.
Dave Small</description>
		<content:encoded><![CDATA[<p>Hi all.</p>
<p>I&#8217;m just moving from my own self-rolled MVC Framework to Symfony, and find it hard to believe that this bug has still not been fixed (v1.4.9).</p>
<p>It makes no sense to me to have a checkbox which only appears &#8216;unchecked&#8217; when the underlying data is null or boolean &#8216;false&#8217;. Under MySQL, the value of zero (0) is often used to represent &#8216;false&#8217; in a TINYINT(1) field.</p>
<p>Changing symfony/lib/widget/sfWidgetFormInputCheckbox.class.php from:</p>
<p><code><br />
if (null !== $value &amp;&amp; $value !== false)<br />
</code></p>
<p>to </p>
<p><code><br />
if (null !== $value &amp;&amp; $value !== false &amp;&amp; $value !== 0)<br />
</code></p>
<p>seems to fix this problem in an uncontroversial way&#8230; so I wonder why this hasn&#8217;t been adopted as a fix&#8230;?</p>
<p>Thanks for the page &#8211; was useful for me.<br />
Dave Small</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nicolas</title>
		<link>http://www.devexp.eu/2009/04/23/sfwidgetforminputcheckbox-unchecked-bug/comment-page-1/#comment-3794</link>
		<dc:creator>nicolas</dc:creator>
		<pubDate>Sat, 24 Jul 2010 15:09:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.devexp.eu/?p=681#comment-3794</guid>
		<description>Hi

why not just change your DB schema ? symfony works well if the value is null
So if you change your schema and reload your data (and maybe make some update) everything work
I understood that because of your patch</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>why not just change your DB schema ? symfony works well if the value is null<br />
So if you change your schema and reload your data (and maybe make some update) everything work<br />
I understood that because of your patch</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zo</title>
		<link>http://www.devexp.eu/2009/04/23/sfwidgetforminputcheckbox-unchecked-bug/comment-page-1/#comment-2643</link>
		<dc:creator>zo</dc:creator>
		<pubDate>Wed, 10 Mar 2010 12:20:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.devexp.eu/?p=681#comment-2643</guid>
		<description>Great solution, just what I was looking for!
Created my own validator and was bugged by the fact that the cleaned value would not appear.
Thanks.</description>
		<content:encoded><![CDATA[<p>Great solution, just what I was looking for!<br />
Created my own validator and was bugged by the fact that the cleaned value would not appear.<br />
Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: snpy</title>
		<link>http://www.devexp.eu/2009/04/23/sfwidgetforminputcheckbox-unchecked-bug/comment-page-1/#comment-1374</link>
		<dc:creator>snpy</dc:creator>
		<pubDate>Mon, 09 Nov 2009 03:51:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.devexp.eu/?p=681#comment-1374</guid>
		<description>Thanks for the tip what to do with &#039;checked&#039; issue.

Just wanted to add my 5 cents:
Condition with only $value in patched widget looks simpler/cleaner then 3 part conjunction.

if ($value) instead line 06. (`patched` listing in first solution).</description>
		<content:encoded><![CDATA[<p>Thanks for the tip what to do with &#8216;checked&#8217; issue.</p>
<p>Just wanted to add my 5 cents:<br />
Condition with only $value in patched widget looks simpler/cleaner then 3 part conjunction.</p>
<p>if ($value) instead line 06. (`patched` listing in first solution).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: LinkTrack</title>
		<link>http://www.devexp.eu/2009/04/23/sfwidgetforminputcheckbox-unchecked-bug/comment-page-1/#comment-1128</link>
		<dc:creator>LinkTrack</dc:creator>
		<pubDate>Wed, 14 Oct 2009 16:17:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.devexp.eu/?p=681#comment-1128</guid>
		<description>Just ran into this problem and found your article.  Very timely and helpful - thanks!</description>
		<content:encoded><![CDATA[<p>Just ran into this problem and found your article.  Very timely and helpful &#8211; thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David L</title>
		<link>http://www.devexp.eu/2009/04/23/sfwidgetforminputcheckbox-unchecked-bug/comment-page-1/#comment-838</link>
		<dc:creator>David L</dc:creator>
		<pubDate>Thu, 10 Sep 2009 10:10:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.devexp.eu/?p=681#comment-838</guid>
		<description>It may not be obvious to people who are still relatively new to Symfony, but the above file (which works perfectly!) should be placed in a file named &#039;myOwnWidgetFormInputCheckbox.class.php&#039; in the base /lib directory of the project, and clear the cache.

The name of the class and the name of the file have to stay in sync (I renamed mine to refer to trac3917).

Thanks a lot for this tip, it was a great help</description>
		<content:encoded><![CDATA[<p>It may not be obvious to people who are still relatively new to Symfony, but the above file (which works perfectly!) should be placed in a file named &#8216;myOwnWidgetFormInputCheckbox.class.php&#8217; in the base /lib directory of the project, and clear the cache.</p>
<p>The name of the class and the name of the file have to stay in sync (I renamed mine to refer to trac3917).</p>
<p>Thanks a lot for this tip, it was a great help</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: van Rumste Kenneth</title>
		<link>http://www.devexp.eu/2009/04/23/sfwidgetforminputcheckbox-unchecked-bug/comment-page-1/#comment-554</link>
		<dc:creator>van Rumste Kenneth</dc:creator>
		<pubDate>Tue, 28 Jul 2009 08:07:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.devexp.eu/?p=681#comment-554</guid>
		<description>to Stevie &gt; thx for commenting on our blog, we do appreciate a nice comment and hope to get more interaction with our readers. 

But unfortunately if you will get into this issue a bit more, and really try to understand the problem, you&#039;ll see that this bug hasn&quot;t been fixed in Symfony. 

As you can see on the right side of our blog, we adore Symfony and do anything to get it to the attention of our visitors as this is like you say a great piece of software. 
But like in all soft wares, it might contain some bugs, and those need to be fixed. By taking action and putting this bugfix on our blog, it might get the attention of Fabien Potencier and his crew, and in the next version get a fix.

Isn&#039;t a community the most important for the open source software developers? i guess so.
So to conclude your comment: thx for your comment, but think before you write ;-)</description>
		<content:encoded><![CDATA[<p>to Stevie > thx for commenting on our blog, we do appreciate a nice comment and hope to get more interaction with our readers. </p>
<p>But unfortunately if you will get into this issue a bit more, and really try to understand the problem, you&#8217;ll see that this bug hasn&#8221;t been fixed in Symfony. </p>
<p>As you can see on the right side of our blog, we adore Symfony and do anything to get it to the attention of our visitors as this is like you say a great piece of software.<br />
But like in all soft wares, it might contain some bugs, and those need to be fixed. By taking action and putting this bugfix on our blog, it might get the attention of Fabien Potencier and his crew, and in the next version get a fix.</p>
<p>Isn&#8217;t a community the most important for the open source software developers? i guess so.<br />
So to conclude your comment: thx for your comment, but think before you write <img src='http://www.devexp.eu/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

