VadimD Posted March 21, 2014 Share Posted March 21, 2014 Уважаемые гуру, прошу вашей помощи. Появились ошибки при поиске по форумам и пользователям. Думаю, что после обновления PHP до версии 5.4, но откатываться назад никак нельзя. Поэтому если есть решение прошу помочь. Поиск по форумам выдает ошибку: Warning: Illegal string offset 'contentOnly' in /www/site.ru/forum/admin/applications/forums/extensions/search/engines/sql.php on line 1055Warning: Illegal string offset 'noPreview' in /www/site.ru/forum/admin/applications/forums/extensions/search/engines/sql.php on line 1049Warning: Illegal string offset 'pCount' in /www/site.ru/forum/admin/applications/forums/extensions/search/engines/sql.php on line 1061Warning: Illegal string offset 'pViews' in /www/site.ru/forum/admin/applications/forums/extensions/search/engines/sql.php on line 1067 При поиске среди пользователей: Warning: Illegal string offset 'searchInKey' in /www/site.ru/forum/admin/applications/members/extensions/search/engines/sql.php on line 391 Версия IP.Board v3.1.4 PHP 5.4.4-14 Link to comment Share on other sites More sharing options...
siv1987 Posted March 21, 2014 Share Posted March 21, 2014 Открыть /admin/applications/forums/extensions/search/engines/sql.phpНайти foreach( $data as $field => $_data ) { /* CONTENT ONLY */ if ( $field == 'noPreview' AND $_data['noPreview'] == 0 ) { IPSSearchRegistry::set( 'opt.noPostPreview', false ); } /* CONTENT ONLY */ if ( $field == 'contentOnly' AND $_data['contentOnly'] == 1 ) { IPSSearchRegistry::set( 'opt.onlySearchPosts', true ); } /* POST COUNT */ if ( $field == 'pCount' AND intval( $_data['pCount'] ) > 0 ) { $return[] = array( 'column' => 't.posts', 'operator' => '>=', 'value' => intval( $_data['pCount'] ) ); } /* TOPIC VIEWS */ if ( $field == 'pViews' AND intval( $_data['pViews'] ) > 0 ) { $return[] = array( 'column' => 't.views', 'operator' => '>=', 'value' => intval( $_data['pViews'] ) ); } } Заменить на foreach( $data as $field => $_data ) { /* CONTENT ONLY */ if ( $field == 'noPreview' AND $_data == 0 ) { IPSSearchRegistry::set( 'opt.noPostPreview', false ); } /* CONTENT ONLY */ if ( $field == 'contentOnly' AND $_data == 1 ) { IPSSearchRegistry::set( 'opt.onlySearchPosts', true ); } /* POST COUNT */ if ( $field == 'pCount' AND intval( $_data ) > 0 ) { $return[] = array( 'column' => 't.posts', 'operator' => '>=', 'value' => intval( $_data ) ); } /* TOPIC VIEWS */ if ( $field == 'pViews' AND intval( $_data ) > 0 ) { $return[] = array( 'column' => 't.views', 'operator' => '>=', 'value' => intval( $_data ) ); } } Открыть /admin/applications/members/extensions/search/engines/sql.php Найти if ( $field == 'searchInKey' AND $_data['searchInKey'] == 'members' ) Заменить на if ( $field == 'searchInKey' AND $_data == 'members' ) 2 Link to comment Share on other sites More sharing options...
VadimD Posted March 21, 2014 Author Share Posted March 21, 2014 Спасибо! Как всегда всё чётко и оперативно :)Если не сложно, что мы убрали из кода? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now