in get_icon function, if the date is not in the right format, returns empty

string


git-svn-id: http://piwigo.org/svn/trunk@492 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
z0rglub 2004-08-21 13:50:54 +00:00
parent a9298b67e8
commit 593574214c

View file

@ -29,6 +29,11 @@ function get_icon( $date )
{
global $user, $conf, $lang;
if (!preg_match('/\d{4}-\d{2}-\d{2}/', $date))
{
return '';
}
list( $year,$month,$day ) = explode( '-', $date );
$unixtime = mktime( 0, 0, 0, $month, $day, $year );