From: Brion Vibber Date: Tue, 2 Jan 2007 10:49:50 +0000 (+0000) Subject: * Avoid PHP warning in Creative Commons metadata when a creative commons X-Git-Tag: 1.31.0-rc.0~54696 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22articles%22%2C%22id_article=%24id_article%22%29%20.%20%22?a=commitdiff_plain;h=9d4614a2b40fc8b3f2127db42f3b7eeb1a33cc20;p=lhc%2Fweb%2Fwiklou.git * Avoid PHP warning in Creative Commons metadata when a creative commons license is not actually set up --- 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(); + } } }