The following changes were made and tested in a PHP 7.4 system (make backups of the files first !):
mod: Post and PM Inline Attachments 5.10
error:
8192: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence
File: /var/www/html/Sources/Subs-InlineAttachmentsAdmin.php
Line: 292
in ./Sources/Subs-InlineAttachmentsAdmin.php:
find:
<input type="hidden" name="count2" value="' . $context['ila_completed'] + ($count - $start). '" />
replace:
<input type="hidden" name="count2" value="' . ($context['ila_completed'] + ($count - $start)). '" />
mod: Advanced Reputation System 1.8.3 (originates from install.xml)
error:
8192: Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
File: /var/www/html/Themes/default/Display.template.php
Line: 50
in ./Themes/default/Display.template.php:
find:
<input type="radio" name="type" value="disagree"', !$context['can_neg_rep'] ? ' disabled="disabled"' : !$context['can_pos_rep'] ? ' checked="checked"' : '', ' /> ', $txt['karma_disagree'], '
replace:
<input type="radio" name="type" value="disagree"', (!$context['can_neg_rep'] ? ' disabled="disabled"' : !$context['can_pos_rep']) ? ' checked="checked"' : '', ' /> ', $txt['karma_disagree'], '
mod: Resize Attached Images (final)
error:
8: Trying to access array offset on value of type bool
File: /var/www/html/Sources/Subs-Post.php
Line: 2322
in ./Sources/Subs-Post.php:
find:
if (!empty($size['mime']))
$mime = $size['mime'];
elseif (isset($validImageTypes[$size[2]]))
$mime = 'image/' . $validImageTypes[$size[2]];
else
$mime = '';
replace:
if (!empty($size['mime']))
$mime = $size['mime'];
elseif ($size != false) {
if (isset($validImageTypes[$size[2]]))
$mime = 'image/' . $validImageTypes[$size[2]];
else
$mime = '';
}
else
$mime = '';