phpmyfaq 4.1.2 - problem with attachment

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
djiri
Posts: 1
Joined: Mon May 04, 2026 6:09 pm

phpmyfaq 4.1.2 - problem with attachment

Post by djiri »

I have now installed version 4.1.2 on rpi5 (it is a clean install, php8.3, apache2.4.66, mariadb 10.11.14).. and I have a problem with adding an attachment to a record. If I press the button to add an attachment it ends with an error:
phpMyFAQ Fatal error

Uncaught exception: 'TypeError'

Message: 'phpMyFAQ\Attachment\AbstractAttachment::setRecordId(): Argument #1 ($recordId) must be of type int, null given, called in ....phpmyfaq/src/phpMyFAQ/Controller/Administration/Api/AttachmentController.php on line 136'

Stack trace:

#0 .....phpmyfaq/src/phpMyFAQ/Controller/Administration/Api/AttachmentController.php(136): phpMyFAQ\Attachment\AbstractAttachment->setRecordId()
#1 [internal function]: phpMyFAQ\Controller\Administration\Api\AttachmentController->upload()
#2 ......phpmyfaq/src/phpMyFAQ/Application.php(133): call_user_func_array()
#3 ......phpmyfaq/src/phpMyFAQ/Application.php(60): phpMyFAQ\Application->handleRequest()
#4 /home/server/web/phpmyfaq/admin/api/index.php(41): phpMyFAQ\Application->run()
#5 {main}

Thrown in '........phpmyfaq/src/phpMyFAQ/Attachment/AbstractAttachment.php' on line 218
(the dots replace the rest of the path - that's correct)
Thank you for your response.
Post Reply