Prevent some PHP warnings

Change-Id: Ifbdf1ee9d74ea102503081be9fe088c1d374062d