Fixed PHP warnings for missing uid value