fixing source of php warnings