mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-15 21:45:56 +00:00
parser: force libxml error messages to valid utf8
This commit is contained in:
@@ -183,10 +183,12 @@ class FeedParser {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// libxml may have invalid unicode data in error messages
|
||||||
function error() {
|
function error() {
|
||||||
return $this->error;
|
return UConverter::transcode($this->error, 'UTF-8', 'UTF-8');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WARNING: may return invalid unicode data
|
||||||
function errors() {
|
function errors() {
|
||||||
return $this->libxml_errors;
|
return $this->libxml_errors;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1170,10 +1170,12 @@ class RSSUtils {
|
|||||||
$sth->execute([$error_msg, $feed]);
|
$sth->execute([$error_msg, $feed]);
|
||||||
|
|
||||||
unset($rss);
|
unset($rss);
|
||||||
|
|
||||||
|
Debug::log("update failed.", Debug::$LOG_VERBOSE);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug::log("done", Debug::$LOG_VERBOSE);
|
Debug::log("update done.", Debug::$LOG_VERBOSE);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user