Fix PHP error introduced with code for #577