Review main Merged

974[BUGFIX] preg_replace error at search for '/'

Dmitry Dulepov CR +2 V +1 Easy +8 −5 updated 06/03/13, 20:49

Commit message

Review

  • Code review CR +2
    • Steffen Kamper +2
    • Jigal van Hemert +2
    • Philipp Gampe +1
  • Verified V +1
    • Jigal van Hemert +1

Files 1

Review log 16

  1. Michael Stucki commented on patch set 1 03/12/11, 08:10

    Looks good to me, but someone else must approve
  2. Andreas Wolf commented on patch set 2 03/12/11, 08:10

    I could not reproduce this issue when wanting to write a unit test for this. Could someone specify a call to split() which leads to the error?
  3. Dmitry Dulepov commented on patch set 2 03/12/11, 08:10

    Patch set 2 replaces all remaining calls to quotemeta and deprecates that function because it is not used anywhere else.
  4. Dmitry Dulepov uploaded patch set 2 03/12/11, 08:10

  5. Dmitry Dulepov commented on patch set 2 03/12/11, 08:10

    Why do you need to use split() there? It is about preg_replace(). Just submit a string with a slash in it.
  6. Steffen Kamper commented on patch set 1 03/12/11, 08:10

    Looks good to me, but someone else must approve
  7. Steffen Kamper commented on patch set 2 03/12/11, 08:10

    Looks good to me, approved
  8. Tobias Liebig commented on patch set 1 03/12/11, 08:10

    (1 inline comment)

    class.tslib_search.php:250

    wouldn't it make sense to use preg_quote in general instead of the "local quotemeta"
  9. Jigal van Hemert commented on patch set 2 03/12/11, 08:10

    Verified; Looks good to me, approved Good catch! Works great with various strange search words.
  10. Philipp Gampe commented on patch set 1 V 0 03/12/11, 08:10

    class.tslib_search.php:235

    same problem here if you put " around search words
  11. Philipp Gampe commented on patch set 1 03/12/11, 08:10

    No score
  12. Philipp Gampe commented on patch set 1 03/12/11, 08:10

    Looks good to me, but someone else must approve
  13. Philipp Gampe commented on patch set 1 V 0 03/12/11, 08:10

    I hope this serves more as a gerrit test. Patch works, but the same problem is in line 253 (because of identical code). As Tobias said, best would be to replace all $this->quotemeta calls.
  14. Philipp Gampe commented on patch set 1 03/12/11, 08:10

    (1 inline comment)
  15. Philipp Gampe commented on patch set 2 03/12/11, 08:10

    Looks good to me, but someone else must approve
  16. Jigal van Hemert merged patch set 2 03/12/11, 08:10