Fix PHP Notice, closes #1503