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)
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)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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)
You are right "tripos" looks like a typo. The whole code looks wired. I will look at it!
Thanks for the catch!
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
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!