diff --git a/libraries/cms/html/content.php b/libraries/cms/html/content.php
index fd6d90ef41873..413a34ff629df 100644
--- a/libraries/cms/html/content.php
+++ b/libraries/cms/html/content.php
@@ -71,7 +71,8 @@ public static function months($state)
foreach ($model->countItemsByMonth() as $item)
{
- $items[] = JHtml::_('select.option', $item->d, (new JDate($item->d))->format('F Y') . ' [' . $item->c . ']');
+ $date = new JDate($item->d);
+ $items[] = JHtml::_('select.option', $item->d, $date->format('F Y') . ' [' . $item->c . ']');
}
return $items;