Search org搜索侧栏问题上的Bender主题

Search org搜索侧栏问题上的Bender主题,search,themes,sidebar,osclass,Search,Themes,Sidebar,Osclass,我选择了osclass.org而不是许多流行的列表/目录脚本,到目前为止,它看起来非常有希望 作为osclass的新手,我在Bender主题中遇到了一个关于search-sidebar.php的小错误 仅当我单击主页上的某个位置时,才会发生此错误。 错误是: 警告:第74行的E:\SERVER-BACKUP\EasyPHP-12.1\www\MyWebSite\osclass\oc content\themes\bender\search-sidebar.php中的非法字符串偏移量“fk\u i

我选择了osclass.org而不是许多流行的列表/目录脚本,到目前为止,它看起来非常有希望

作为osclass的新手,我在Bender主题中遇到了一个关于search-sidebar.php的小错误

仅当我单击主页上的某个位置时,才会发生此错误。 错误是: 警告:第74行的E:\SERVER-BACKUP\EasyPHP-12.1\www\MyWebSite\osclass\oc content\themes\bender\search-sidebar.php中的非法字符串偏移量“fk\u i\u parent\u id”

search-sidebar.php中的第74行:

<?php $parentSelected=false; if (in_array(osc_category_id(), osc_search_category()) || in_array(osc_categ2ory_slug()."/", osc_search_category()) || in_array(osc_category_slug(), osc_search_category()) || count(osc_search_category())==0 || $category['fk_i_parent_id'] == osc_category_id()){ $parentSelected=true;} ?>

如果有人建议我如何解决这个问题,我将非常感激。

请更换

$category['fk_i_parent_id'] == osc_category_id()

不要忘记“(“和”)”

如果是这样的话

<?php $parentSelected=false; if (in_array(osc_category_id(), osc_search_category()) || in_array(osc_categ2ory_slug()."/", osc_search_category()) || in_array(osc_category_slug(), osc_search_category()) || count(osc_search_category())==0 || (isset($category['fk_i_parent_id]) && $category['fk_i_parent_id'] == osc_category_id())){ $parentSelected=true;} ?>

你认为$category是数组而不是字符串吗?我真的不知道,因为这个主题是由osclass开发的。正因为如此,我不知道从哪里开始。我还在他们的论坛上放了一个话题。
<?php $parentSelected=false; if (in_array(osc_category_id(), osc_search_category()) || in_array(osc_categ2ory_slug()."/", osc_search_category()) || in_array(osc_category_slug(), osc_search_category()) || count(osc_search_category())==0 || (isset($category['fk_i_parent_id]) && $category['fk_i_parent_id'] == osc_category_id())){ $parentSelected=true;} ?>