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

fix(ecm-files): missing src_object_type and src_object_id #32580

Closed

Conversation

atm-irvine
Copy link
Contributor

FIX|Fix Missing src_object_type and src_object_id

When I create an invoice and the PDF is automatically generated, in the ecm_files table it doesn't fill src_object_type and src_object_id.

@@ -382,6 +381,8 @@ function completeFileArrayWithDatabaseInfo(&$filearray, $relativedir)
$ecmfile->label = md5_file(dol_osencode($filearray[$key]['fullname'])); // $destfile is a full path to file
$ecmfile->fullpath_orig = $filearray[$key]['fullname'];
$ecmfile->gen_or_uploaded = 'unknown';
$ecmfile->src_object_type = $object->element;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happen if $object is not set or null or an object with these properties ?

@eldy eldy added the Discussion Some questions or discussions are opened and wait answers of author or other people to be processed label Jan 9, 2025
@atm-irvine atm-irvine closed this Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Some questions or discussions are opened and wait answers of author or other people to be processed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants