Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted June 17, 20231 yr In the recent 4.7.11 update, I've noticed you updated the search filters code in \applications\core\modules\front\search\search.php to cast the variables as (int) types: if ( isset( \IPS\Request::i()->search_min_replies ) AND isset( $class::$commentClass ) ) { $filter->minimumComments( (int) \IPS\Request::i()->search_min_replies + 1 ); $baseUrl = $baseUrl->setQueryString( 'search_min_replies', (int) \IPS\Request::i()->search_min_replies ); $titleConditions[] = \IPS\Member::loggedIn()->language()->addToStack( 'search_blurb_min_replies', FALSE, [ 'sprintf' => [ (int) \IPS\Request::i()->search_min_replies ] ] ); } Note how there are 3 values cast as (int) in the code above. However, in the code for minimum reviews on line 514, the $baseUrl line wasn't updated: if ( isset( \IPS\Request::i()->search_min_reviews ) AND isset( $class::$reviewClass ) ) { $filter->minimumReviews( (int) \IPS\Request::i()->search_min_reviews ); $baseUrl = $baseUrl->setQueryString( 'search_min_reviews', \IPS\Request::i()->search_min_reviews ); $titleConditions[] = \IPS\Member::loggedIn()->language()->addToStack( 'search_blurb_min_reviews', FALSE, [ 'sprintf' => [ (int) \IPS\Request::i()->search_min_reviews ] ] ); } For consistency, it should be: $baseUrl = $baseUrl->setQueryString( 'search_min_reviews', (int) \IPS\Request::i()->search_min_reviews );
June 19, 20231 yr Thank you for bringing this issue to our attention! I can confirm this should be further reviewed and I have logged an internal bug report for our development team to investigate and address as necessary, in a future maintenance release.
July 20, 20231 yr Solution This issue was resolved in our recent 4.7.12 release of the platform. Please upgrade to this version to resolve the bug, and if you experience any further issues with this, please let us know.