mails2nitesh / kfm

Automatically exported from code.google.com/p/kfm
0 stars 0 forks source link

Settings cannot be saved with sqlite #21

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Settings cannot be saved with  sqlite

Original issue reported on code.google.com by nilsfeld@gmail.com on 17 Nov 2009 at 7:17

GoogleCodeExporter commented 8 years ago
got it. obscure and stupid one. if you run a function that returns either an 
array or
false, then running count() on the result will return true whatever the result. 
so
the answer is to first check that the result is not false...

ie., I replaced this:
if(count($s)){

with this:
if($s && count($s)){

Original comment by kae.verens@gmail.com on 18 Nov 2009 at 9:16

GoogleCodeExporter commented 8 years ago
forgot to mark as fixed.

Original comment by kae.verens@gmail.com on 18 Nov 2009 at 9:17