Merge pull request #434 from Harmageddon/patch-1

Fix PHP warnings
This commit is contained in:
Tuan Pham Ngoc 2021-08-18 15:40:46 +07:00 committed by GitHub
commit 427998ee0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 8 deletions

View File

@ -13,9 +13,6 @@ JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
JHtml::_('behavior.framework');
// Create a shortcut for params.
$params = &$this->item->params;
// Get the user object.
$user = JFactory::getUser();
@ -69,7 +66,7 @@ $listDirn = $this->escape($this->state->get('list.direction'));
<?php if ($canEdit) : ?>
<span class="list-edit pull-left width-50">
<?php echo JHtml::_('icon.edit', $item, $params); ?>
<?php echo JHtml::_('icon.edit', $item, $item->params); ?>
</span>
<?php endif; ?>
@ -126,10 +123,8 @@ $listDirn = $this->escape($this->state->get('list.direction'));
}
?>
</div>
<?php $tagsData = $item->tags->getItemTags('com_weblinks.weblink', $item->id); ?>
<?php if ($this->params->get('show_tags', 1)) : ?>
<?php $this->item->tagLayout = new JLayoutFile('joomla.content.tags'); ?>
<?php echo $this->item->tagLayout->render($tagsData); ?>
<?php if ($this->params->get('show_tags', 1) && !empty($item->tags->itemTags)) : ?>
<?php echo JLayoutHelper::render('joomla.content.tags', $item->tags->itemTags); ?>
<?php endif; ?>
<?php if (($this->params->get('show_link_description')) and ($item->description != '')) : ?>
<?php $images = json_decode($item->images); ?>