The conditional which failed was this one:
[ $is_default_maintenance_pw -eq 1 ]
It has nothing on the left, which can't be compared to an integer at all, so the comparison fails with "[: -eq: unary operator expected". (Note to Check Point: integer comparisons are fundamentally unsafe in bash. You need to test that the variable exists and contains an integer first, or wrap both sides in quotes and do a string comparison.) That comparison is only attempted in the 'else' branch of this comparison, though:
if [[ $is_maintenance_pw_not_mandatory == $TRUE ]]
The variable 'is_maintenance_pw_not_mandatory' is never actually set in the script, so it expects the value to come from outside. As a result, we can just manipulate this comparison to not take the failing branch. Presto: no failure.
Note that this just bypasses the check for whether config_system should require you to specify a maintenance mode password. It still accepts the maintenance_hash value and sets the hash if the value is present. Otherwise, it leaves the password at the default value, which appears to be 'changeme'.