Merge pull request 'Support PHP 8.1 while keeping compatibility with 7.x' (#67) from yan12125/tt-rss:php8.1 into master
Reviewed-on: https://git-gitea.tt-rss.org/fox/tt-rss/pulls/67
This commit is contained in:
commit
95431890be
|
@ -70,7 +70,7 @@ class FeedItem_Atom extends FeedItem_Common {
|
||||||
*
|
*
|
||||||
* @return string the rewritten XML or original $content
|
* @return string the rewritten XML or original $content
|
||||||
*/
|
*/
|
||||||
private function rewrite_content_to_base(?string $base = null, string $content) {
|
private function rewrite_content_to_base(?string $base = null, ?string $content = '') {
|
||||||
|
|
||||||
if (!empty($base) && !empty($content)) {
|
if (!empty($base) && !empty($content)) {
|
||||||
|
|
||||||
|
|
|
@ -200,7 +200,7 @@ class FeedParser {
|
||||||
|
|
||||||
// libxml may have invalid unicode data in error messages
|
// libxml may have invalid unicode data in error messages
|
||||||
function error() : string {
|
function error() : string {
|
||||||
return UConverter::transcode($this->error, 'UTF-8', 'UTF-8');
|
return UConverter::transcode($this->error ?? '', 'UTF-8', 'UTF-8');
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @return array<string> - WARNING: may return invalid unicode data */
|
/** @return array<string> - WARNING: may return invalid unicode data */
|
||||||
|
|
|
@ -23,7 +23,7 @@ class Feeds extends Handler_Protected {
|
||||||
*/
|
*/
|
||||||
private function _format_headlines_list($feed, string $method, string $view_mode, int $limit, bool $cat_view,
|
private function _format_headlines_list($feed, string $method, string $view_mode, int $limit, bool $cat_view,
|
||||||
int $offset, string $override_order, bool $include_children, ?int $check_first_id = null,
|
int $offset, string $override_order, bool $include_children, ?int $check_first_id = null,
|
||||||
bool $skip_first_id_check, string $order_by): array {
|
?bool $skip_first_id_check = false, ? string $order_by = ''): array {
|
||||||
|
|
||||||
$disable_cache = false;
|
$disable_cache = false;
|
||||||
|
|
||||||
|
|
|
@ -138,7 +138,7 @@ class Pref_System extends Handler_Administrative {
|
||||||
$sth->execute($errno_values);
|
$sth->execute($errno_values);
|
||||||
|
|
||||||
while ($line = $sth->fetch()) {
|
while ($line = $sth->fetch()) {
|
||||||
foreach ($line as $k => $v) { $line[$k] = htmlspecialchars($v); }
|
foreach ($line as $k => $v) { $line[$k] = htmlspecialchars($v ?? ''); }
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class='errno'>
|
<td class='errno'>
|
||||||
|
|
|
@ -31,7 +31,7 @@ class jimIcon {
|
||||||
}
|
}
|
||||||
if ($a != 127)
|
if ($a != 127)
|
||||||
$this->all_transaprent = 0;
|
$this->all_transaprent = 0;
|
||||||
return imagecolorallocatealpha($img, $r, $g, $b, $a);
|
return imagecolorallocatealpha($img, $r, $g, $b, (int) $a);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Given a string with the contents of an .ICO,
|
// Given a string with the contents of an .ICO,
|
||||||
|
|
Loading…
Reference in New Issue