erintheunready / ComicControl

The main repo for ComicControl Development.
24 stars 6 forks source link

XML Parsing Error #25

Closed nocturnenebula closed 1 year ago

nocturnenebula commented 2 years ago

Hi, I've been running into an error after I recently installed ComicCTRL. For some reason the RSS page gives me this error:

error

XML Parsing Error: junk after document element Location: https://mnemoria.com/comic/rss Line Number 2, Column 1: Deprecated: Unparenthesized a ? b : c ? d : e is deprecated. Use either (a ? b : c) ? d : e or a ? b : (c ? d : e) in /home/mnemoria/public_html/comiccontrol/parts/comic-rss.php on line 7
^

Should I just follow the advice given for the error? I'm not sure how to fix this.

JulianWebb commented 2 years ago

Hello,

It would seem your PHP version is newer than the one used when creating ComicControl, causing it to spit out a warning that then causes your XML parser to stumble.

The issue is with lines 7-9 of /comiccontrol/parts/comic-rss.php. I believe a less warning inducing replacement would be as follows:

$s = "";
if ($_SERVER["https"] === "on") {
    $s = "s";
}

I do not know when ComicControl will next update, but if you are keen you could replace the problem lines with that above in your ComicControl install.

nocturnenebula commented 2 years ago

Thanks, this worked perfectly. Hopefully there'll be another CC update in the future!