Fix PHP warnings

Similar to https://github.com/joomla/joomla-cms/pull/27273

Fixes #433.

This PR fixes PHP warnings for the weblinks category view.
This commit is contained in:
Constantin Romankiewicz 2021-03-28 14:22:51 +02:00 committed by GitHub
parent dffe7c53c3
commit 84ec6b93e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 6 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; ?>
@ -128,8 +125,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 $tagLayout = new JLayoutFile('joomla.content.tags'); ?>
<?php echo $tagLayout->render($tagsData); ?>
<?php endif; ?>
<?php if (($this->params->get('show_link_description')) and ($item->description != '')) : ?>
<?php $images = json_decode($item->images); ?>