Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when you run document merge on SOME persons shown in a report #1009

Closed
tbar0970 opened this issue Apr 3, 2024 · 2 comments
Closed

Comments

@tbar0970
Copy link
Owner

tbar0970 commented Apr 3, 2024

View a report
Tick SOME of the persons but not all
Mail merge a document

Undefined offset: 7 
Line 254 of /home/jethro/code/2.34.1/app/calls/call_document_merge.class.php
USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36

It seems like the code is making the assumption that all persons in the report will be part of the merge

@tim-pearce
Copy link
Contributor

My version, which has that same code does not get that error.

@tim-pearce
Copy link
Contributor

I don't have a running copy of version 2.34.1.
I can only assume that line 248,249 is returning data for all persons.
In that case replace
$merge_data[$val] += $data;
with
if (isset($merge_data[$val])) {
$merge_data[$val] += $data;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants