Closed johanneskonst closed 1 year ago
@johanneskonst have been looking at why your results may be different to mine i m using php 5.6 where the # is not excaped but is from php 7.3.
i am using the # as a delimiter of preg_match string. in 7.3 # is a now special regular expression character.
i think the code should be changed to $pattern = '#'. preg_quote($find_string).'#'; i have included this change into pr178
I'm running 7.4 (for now) and got these 'errors' in my error.log when debug=1
Basically notices (i think) but I like to improve code wherever I can.
The 'bug' in this case was using preg_quote
on the whole $pattern
instead of just the part that should do the matching; after that also added the second argument for good measure (and stability, it's better to be precise et al...)
And please don't include existing PR changes in a new PR, it makes merging difficult etc. It would be preferred to accept the first PR and make additional/reverting changes in a second PR.
I don't think it works like you think it works (tm) This removes a ton of warnings from my error_log. Trace page still doesn't work for me, but that's another issue...