fix PHP 8.0 TypeError: Unsupported operand types: string & int

This commit is contained in:
Ralf Becker 2021-11-11 07:59:54 +01:00
parent d0f34b3c1c
commit 46e384198b

View File

@ -158,7 +158,7 @@ class Script
// <crnl>s will be encoded as \\n. undo this.
$rule['action_arg'] = preg_replace("/\\\\n/","\r\n",$rule['action_arg']);
$rule['action_arg'] = stripslashes($rule['action_arg']);
$rule['flg'] = $bits[8]; // bitwise flag
$rule['flg'] = $bits[8] = (int)$bits[8]; // bitwise flag
$rule['field'] = stripslashes($bits[9]);
$rule['field_val'] = stripslashes($bits[10]);
$rule['size'] = $bits[11];