Menu

#384 Function name tripos instead of stripos, typo?

closed-fixed
nobody
Other (69)
5
2010-03-13
2010-03-04
openfan
No

Line 111 of action.php contains a function call to tripos, shouldn't this be stripos?
Maybe this mistyped or-condition can be completely removed because it is already matched by preg_match('|JP[E]?G|i', $img_type)

NOCC 1.8.2

Discussion

  • Tim Gerundt

    Tim Gerundt - 2010-03-05

    Your comment from the twiced post bug:

    Additional question:
    Why is JP(E)G the only type which is matched case insensitive, why not
    also preg_match('|GIF|i', $img_type) and preg_match('|PNG|i', $img_type)

     
  • Tim Gerundt

    Tim Gerundt - 2010-03-05

    You are right "tripos" looks like a typo. The whole code looks wired. I will look at it!

    Thanks for the catch!

     
  • Michiel van Loon

    This has been introduced with my patch 2895511 that removed the ereg calls and replaced them by preg_match.
    The correct construction would be to replace the stripos calls by pregmatch calls. I forgot to change this as the stripos calls were my first conversion try.
    Sorry about the bug introduced

     
  • Tim Gerundt

    Tim Gerundt - 2010-03-13

    Committed to SVN (In Revision 2134)

    @openfan:
    Thank you for the good catch!

    @mfvl:
    No problem, I am also not bug free! ;-)
    And your patch #2895511 was a good step!

     
  • Tim Gerundt

    Tim Gerundt - 2010-03-13
    • status: open --> closed-fixed
     

Log in to post a comment.