Skip to content

Commit

Permalink
The fix for Joomla progressive cache causing multiple duplicate javas…
Browse files Browse the repository at this point in the history
…cript declarations (#20310)
  • Loading branch information
tgv604 authored and HLeithner committed May 20, 2019
1 parent 7a4f97f commit 014bf30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libraries/src/Document/HtmlDocument.php
Expand Up @@ -309,7 +309,7 @@ public function mergeHeadData($data)
{
foreach ($data['style'] as $type => $stdata)
{
if (!isset($this->_style[strtolower($type)]) || !stristr($this->_style[strtolower($type)], $stdata))
if (!isset($this->_style[strtolower($type)]) || !stristr($stdata, $this->_style[strtolower($type)]))
{
$this->addStyleDeclaration($stdata, $type);
}
Expand All @@ -324,7 +324,7 @@ public function mergeHeadData($data)
{
foreach ($data['script'] as $type => $sdata)
{
if (!isset($this->_script[strtolower($type)]) || !stristr($this->_script[strtolower($type)], $sdata))
if (!isset($this->_script[strtolower($type)]) || !stristr($sdata, $this->_script[strtolower($type)]))
{
$this->addScriptDeclaration($sdata, $type);
}
Expand Down

0 comments on commit 014bf30

Please sign in to comment.