mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-05-10 18:35:50 +03:00
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:
parent
a9298b67e8
commit
593574214c
1 changed files with 5 additions and 0 deletions
|
@ -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 );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue