teraßyte Posted June 17, 2023 Posted June 17, 2023 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 ); SeNioR- 1
Marc Posted June 19, 2023 Posted June 19, 2023 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.
Solution Marc Posted July 20, 2023 Solution Posted July 20, 2023 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.
Recommended Posts