Pending

User tests: Successful: Unsuccessful:

avatar ReLater
ReLater
12 Apr 2021

Pull Request for issue #32115

Replaces pr #32638

Summary of Changes

  • Check mb_strlen of provided text before calling mb_strpos.
  • Remove @ . Not needed anymore because of that check and senseless with PHP8.

Testing Instructions

  • Joomla 3.9.25 or Joomla 3.9.26-dev. PHP 8.
  • Create an article that contains a search word in article text BUT NOT in article title.
    E.g. modulstil
  • Enter an article title that contains one or more UTF8 characters like german umlauts.
    E.g. Größte Blödheit grämt den Lümmel
  • Save article.
  • In front-end search with com_search (Module or Component) with search word modulstil

Actual result BEFORE applying this Pull Request

  • Fatal error 0 mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
  • For the interested ones: See call stack: #32115 (comment)

Expected result AFTER applying this Pull Request

  • No errors. Search result displayed in list of search results.
avatar ReLater ReLater - open - 12 Apr 2021
avatar ReLater ReLater - change - 12 Apr 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 12 Apr 2021
Category Administration com_search
avatar ReLater ReLater - change - 12 Apr 2021
The description was changed
avatar ReLater ReLater - edited - 12 Apr 2021
avatar ReLater ReLater - edited - 12 Apr 2021
avatar ReLater ReLater - change - 12 Apr 2021
Title
[3.9.24, PHP8] com_search. Fix fatal error "mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)"
[3.9.24+, PHP8] com_search. Fix fatal error "mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)"
avatar ReLater ReLater - change - 12 Apr 2021
The description was changed
avatar ReLater ReLater - edited - 12 Apr 2021
avatar ReLater ReLater - change - 12 Apr 2021
The description was changed
avatar ReLater ReLater - edited - 12 Apr 2021
avatar sandramay0905 sandramay0905 - test_item - 16 Apr 2021 - Tested successfully
avatar sandramay0905
sandramay0905 - comment - 16 Apr 2021

I have tested this item successfully on ca5c3c4


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/33113.

Add a Comment

Login with GitHub to post a comment