From 9d4614a2b40fc8b3f2127db42f3b7eeb1a33cc20 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 2 Jan 2007 10:49:50 +0000 Subject: [PATCH] * Avoid PHP warning in Creative Commons metadata when a creative commons license is not actually set up --- RELEASE-NOTES | 3 +++ includes/Metadata.php | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 7b065b9ae9..3a79f3d6da 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -449,6 +449,9 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN preferred, utilize it for more parser tests of language variants code * (bug 6503) Fix bug that stopped certain irrelevant links from being hidden for printing +* Avoid PHP warning in Creative Commons metadata when a creative commons + license is not actually set up + == Languages updated == diff --git a/includes/Metadata.php b/includes/Metadata.php index 4f3c7b15e0..b48ced0de9 100644 --- a/includes/Metadata.php +++ b/includes/Metadata.php @@ -317,7 +317,11 @@ function ccGetTerms($url) { return $wgLicenseTerms; } else { $known = getKnownLicenses(); - return $known[$url]; + if( isset( $known[$url] ) ) { + return $known[$url]; + } else { + return array(); + } } } -- 2.20.1