From d0b820fcad064aeead233959054a907da83be10f Mon Sep 17 00:00:00 2001 From: Felix Niklas Date: Wed, 23 Mar 2016 14:26:35 +0100 Subject: [PATCH] fix php errors in license editor --- contrib/edit-icon-license-list.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/contrib/edit-icon-license-list.php b/contrib/edit-icon-license-list.php index 97d8ae772..f276e40e1 100644 --- a/contrib/edit-icon-license-list.php +++ b/contrib/edit-icon-license-list.php @@ -137,6 +137,8 @@ $sortByImageName = false; # This is only used if images are sorted by date (see above) $newestImagesFirst = true; +date_default_timezone_set('Europe/Berlin'); + # The rest of the code is technical # Add images to array @@ -170,6 +172,14 @@ if ($sortByImageName) { $filename = basename($image); $name = preg_replace('/\\.[^.\\s]{3,4}$/', '', $filename); + if(!array_key_exists($filename, $author_data)){ + $author_data[$filename] = array( + 'author' => '', + 'url' => '', + 'license' => '' + ); + } + # Begin adding ?>
@@ -186,7 +196,7 @@ if ($sortByImageName) {
- +