diff --git a/libraries/joomla/document/document.php b/libraries/joomla/document/document.php
index 1e2005aba5c05..10e45ca2a16a2 100644
--- a/libraries/joomla/document/document.php
+++ b/libraries/joomla/document/document.php
@@ -414,7 +414,7 @@ public function getMetaData($name, $attribute = 'name')
* Sets or alters a meta tag.
*
* @param string $name Name of the meta HTML tag
- * @param string $content Value of the meta HTML tag
+ * @param mixed $content Value of the meta HTML tag as array or string
* @param string $attribute Attribute to use in the meta HTML tag
*
* @return JDocument instance of $this to allow chaining
@@ -423,6 +423,12 @@ public function getMetaData($name, $attribute = 'name')
*/
public function setMetaData($name, $content, $attribute = 'name')
{
+ // Pop the element off the end of array if target function expects a string or this http_equiv parameter.
+ if (is_array($content) && (in_array($name, array('generator', 'description')) || !is_string($attribute)))
+ {
+ $content = array_pop($content);
+ }
+
// B/C old http_equiv parameter.
if (!is_string($attribute))
{
diff --git a/libraries/joomla/document/renderer/html/head.php b/libraries/joomla/document/renderer/html/head.php
index 3d6f747b0192a..b1b36d79ea60f 100644
--- a/libraries/joomla/document/renderer/html/head.php
+++ b/libraries/joomla/document/renderer/html/head.php
@@ -94,7 +94,17 @@ public function fetchHead($document)
}
elseif ($type != 'http-equiv' && !empty($content))
{
- $buffer .= $tab . '' . $lnEnd;
+ if (is_array($content))
+ {
+ foreach ($content as $value)
+ {
+ $buffer .= $tab . '' . $lnEnd;
+ }
+ }
+ else
+ {
+ $buffer .= $tab . '' . $lnEnd;
+ }
}
}
}