Oh, good, I understand now. I'm a pretty experienced PHP dev so I understand where it comes from but I really have no idea how to fix it.

Thanks for the info, any tips on how to approach this error so you can merge in the header & footer?