Occasionally such errors appear due to the wrong third-party code. Unfortunately, we don’t know what’s wrong with this code because it belongs to a third-party customization code.
Try contacting those who gave you this code to further resolve the issue.
Please let us know if there are any further questions or concerns you may have. We are always happy to assist.