Opened 5 years ago
Closed 5 years ago
#13368 closed Patch - Bug Fix (Fixed)
Fix PHP warning and compilation error in mythweb search
Reported by: | k-ross | Owned by: | Stuart Auchterlonie |
---|---|---|---|
Priority: | minor | Milestone: | 30.1 |
Component: | Plugin - MythWeb | Version: | v30-fixes |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
I believe this started happening since upgrading PHP to 7.3.
First, it fixes the following warning: Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
Secondly, it fixes a regular expression compilation error: Warning at /usr/share/mythtv/mythweb/modules/tv/search.php, line 464: !NoTrans: preg_replace(): Compilation failed: invalid range in character class at offset 3!!
This was caused by using "-" inside square brackets "[]". If you want to search explicitly for "-", you need to have the "-" at the beginning or end, not in the middle, otherwise it thinks you're trying to do a range, like "a-z".
Attachments (1)
Change History (5)
Changed 5 years ago by
Attachment: | mythweb.patch added |
---|
comment:1 Changed 5 years ago by
comment:2 Changed 5 years ago by
Milestone: | needs_triage → 30.1 |
---|---|
Version: | Unspecified → v30-fixes |
comment:3 Changed 5 years ago by
This issue is evident in Fedora 30 (which includes PHP 7.3.4 by default), therefore expect reports of this to increase as people upgrade. If the patch is acceptable it might be good to push it into v30-fixes as soon as possible.
comment:4 Changed 5 years ago by
Resolution: | → Fixed |
---|---|
Status: | new → closed |
I hadn't seen this bug report, and ended up fixing the issues independently. Fixed in the master branch by commit e3a1fc78.
FWIW I have tried this patch and it resolves the issue for me.
I also had to bump
memory_limit
in/etc/mythtv/mythweb.conf
from 64M to 128M, but I think that's independent of the changes here (and perhaps system specific).