Fix PHP Warning
Merge pull request #2203 from krbvroc1/writepanel-fixes

Fix PHP Warnings