Fix CRM-12013: Fixed PHP warnings.