Internal error (500), Impossible to access an attribute ("fullPath") on a null variable.
Created by: Rabjerg
Describe the bug
If you add a attachment (tested with *.pdf) to a part and have not yet defined any attachment types, it is possible to create a part that cannot be accessed anymore.
When the part is access it returns a internal error.
Stacktrace can be viewed here: https://gist.github.com/Rabjerg/61854885a7f1fc5a92bf3177def193a2
Issue seems similar to #116
To Reproduce Steps to reproduce the behavior:
- On a fresh install
- Create any "category" and "part"
- Do NOT create any "Attachment Type"
- Upload a file to the "part" attachment tab and save
- Browse and access the part from category menu.
- ... borked ...
Expected behavior Not being borked
Screenshots
Server Side
- Part-DB Version: Part-DB docker (jbtronics/part-db1:master d2c2c5c55cbc)
- PHP Version: 7.4.24
- Apache Version: 2.4.48 (Debian)
- Database Server:
Desktop (please complete the following information):
- OS: 5.15.12-1-MANJARO
- Browser: Vivaldi
- Version: 5.0.2497.32 (Stable channel) stable (64-bit)