Implemented suggested solution to PHP version incompatibility