gpt4 book ai didi

How can i fix Notice: Trying to access array offset on value of type null prestashop 1.7.8.8(如何修复通知:尝试访问类型为空的值的数组偏移量prestashop 1.7.8.8)

转载 作者:bug小助手 更新时间:2023-10-28 21:20:20 28 4
gpt4 key购买 nike



Im working on prestashop 1.7.8.8 with theme bos nature, Im trying to fix a template issue but i cant see whats happening here. The template when i see it in front office is showing the code below:

我正在与主题Bos自然的prestashop 1.7.8.8工作,我试图修复一个模板问题,但我看不到这里发生了什么。我在前台看到的模板显示的代码如下:


Code:

代码:


    <div id="js-product-list-header">
{if $listing.pagination.items_shown_from == 1}
<div class="block-category card card-block">
<h1 class="h1">{$category.name}</h1>
<div class="block-category-inner">
{if $category.description}
<div id="category-description" class="text-muted">{$category.description nofilter}</div>
{/if}
{if $category.image.large.url}
<div class="category-cover">
<img src="{$category.image.large.url}" alt="
{if !empty($category.image.legend)}
{$category.image.legend}
{else}
{$category.name}
{/if}">
</div>
{/if}
</div>
</div>
{/if}
</div>

It says is the category-header.tpl. It throws an error like that: Notice: Trying to access array offset on value of type null

它说是category-header. tpl。它会抛出这样的错误:注意:尝试访问null类型值的数组偏移量


If i put the {/if} without spaces it throws me an error and if i put the { /if } like that, then shows the template code in front when im in a products category template.

如果我把{/if}放在没有空格的地方,它会抛出一个错误,如果我把{/if}放在那样,那么当我在Products类别模板中时,会在前面显示模板代码。


Can yoou assist me with it?

你能帮我搬一下吗?


Thank you in advance

先谢谢你


更多回答
优秀答案推荐

It is probably related to this part:

这可能与这一部分有关:


{if !empty($category.image.legend)}

{if!Empty($Category y.Image.Legend)}


which doesn't work perfectly in Smarty. You could try:

这在聪明人身上并不完美你可以试试:


{if isset($category.image) && !empty($category.image.legend)} since !empty in Smarty has a faulty behavior sometimes.

由于Smarty中的!Empty有时会出现错误行为,因此,{if isset($categy.Image)&&!Empty($Category y.Image.Legend)}。


更多回答

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com