[geeklog-devel] Solution for Bug 0000853
dirk at haun-online.de
Sat Apr 11 15:38:27 EDT 2009
Stan Palatnik wrote:
>The simplest fix is including checkdate() in both the start and end dates
>Another faster solution would be just to check if mkdate returns false
> $startdate = mktime(0,0,0,$DS,$DS,$DS);
Actually, when you crank up the error_reporting to E_ALL you already get
an error for the mktime() call: "A non well formed numeric value encountered".
I think the first thing we should be checking for is that the $DS and
$DE arrays both have exactly 3 elements. And if the user mixed in some
letters, both checkdate() and mktime() will barf again, so we may want
to cast the 3 elements to (int) when calling any of those functions.
Apart from that technicality, the real problem here is that this code
exists in pretty much every plugin out there that implemented the search
function ... And it doesn't look like the new search in 1.6.0 would
change anything here. Sami?
More information about the geeklog-devel