aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_html.inc.php
diff options
context:
space:
mode:
authorz0rglub <z0rglub@piwigo.org>2004-08-21 13:50:54 +0000
committerz0rglub <z0rglub@piwigo.org>2004-08-21 13:50:54 +0000
commit593574214c8dcbd9fa5bb79060d9bbbc81ffd1fc (patch)
tree03bd3d47ed3a57a5097197d98857de0f91ad276f /include/functions_html.inc.php
parenta9298b67e872f09532a4ed3cafde75826dad0536 (diff)
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
Diffstat (limited to '')
-rw-r--r--include/functions_html.inc.php5
1 files changed, 5 insertions, 0 deletions
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 );