Fixes to prevent PHP notices

Hi Martin,

Would you mind merging in these fixes to two PHP files please?

Many thanks,

Nick


* Ensure PHP variables "$sep" and $trickytopic are defined before they are used