Opened 4 months ago

Last modified 3 months ago

#13368 new Patch - Bug Fix

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)

mythweb.patch (1.3 KB) - added by k-ross 4 months ago.

Download all attachments as: .zip

Change History (3)

Changed 4 months ago by k-ross

Attachment: mythweb.patch added

comment:1 Changed 3 months ago by ijc

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).

comment:2 Changed 3 months ago by Stuart Auchterlonie

Milestone: needs_triage30.1
Version: Unspecifiedv30-fixes
Note: See TracTickets for help on using tickets.