Fix PHP warnings from 7f803ce74cc15df71698c9bb07b44f31c695db97