Preventing notice in older versions of php