Skip to content

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:

  1. On a fresh install
  2. Create any "category" and "part"
  3. Do NOT create any "Attachment Type"
  4. Upload a file to the "part" attachment tab and save
  5. Browse and access the part from category menu.
  6. ... borked ...

Expected behavior Not being borked

Screenshots

Screenshot_20220105_000902

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)