From 593574214c8dcbd9fa5bb79060d9bbbc81ffd1fc Mon Sep 17 00:00:00 2001 From: z0rglub Date: Sat, 21 Aug 2004 13:50:54 +0000 Subject: 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 --- include/functions_html.inc.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php index bdb89eace..7fe37a42e 100644 --- a/include/functions_html.inc.php +++ b/include/functions_html.inc.php @@ -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 ); -- cgit v1.2.3