This isn’t an error. It’s a warning, and the developers probably don’t consider it a bug. Unless you’re in a testing environment, warnings should be supressed by your webserver. Printing stuff like that to the screen can be a serious security issue.
I supress these warnings in my own functions by preceding the offending statement with the ‘@’ symbol. Usually everything works fine, save for the weird message breaking the layout.