Civievents - warning when user registers for event (CiviCRM 4.7.23)
You mention that you see this error on the production version as well.  This indicates that your production site is displaying errors, which is a PHP misconfiguration.  There are many similar questions on Stack Overflow on setting PHP error reporting, but the best reference is the error reporting page of the PHP manual.

This doesn't solve the underlying issue, but it will hide the messages in production.