Open reetp opened 6 years ago
Here's a funny thing I have just seen. There are two insertIntoAttachment functions. One in Products.php and one in CRMEntity.php
Is that necessary ?
I'll have a look at adding that check when I visit the security enhancements in image upload.
The insertintoattachment method on products is special because it has to support the special carusel field on that module. That is what the first loop is for, at the end it calls the parent method to support other normal image fields.
When we upload a file we should really error check the upload completes before running anything else like insertattachment
So roughly this, but needs checking that error is not = 0 and an exit so if the file is not uploaded we don't run insertToAttachment etc.
Not quite sure the best way to do it, but at least it is noted here.
// This shouldn't run from here down if the file is not uploaded