I got the same error (but on line 355) running 1.5.6c and PHP 7.2

I made the amendment Doc suggested - adding $errors_object = array(); as Edadk said it resolved the issue - but has anyone feedback on the effect of changing the instances of count to
Code:
if (!empty($errors_object)) {
in square.php??

Cheers
Brinley