Giter Club home page Giter Club logo

Comments (5)

RemBdev avatar RemBdev commented on September 24, 2024

Hi @thorsten thanks for fixing. Now i have this issue, and still don't see the attachment:

<h1>phpMyFAQ Fatal error</h1><p>Uncaught exception: 'TypeError'</p><p>Message: 'phpMyFAQ&bsol;Attachment&bsol;AttachmentAbstract&colon;&colon;getRecordId&lpar;&rpar;&colon; Return value must be of type int&comma; null returned'</p><p>Stack trace:<pre>#0 /var/www/html/attachment.php(54): phpMyFAQ\Attachment\AttachmentAbstract->getRecordId()
#1 /var/www/html/index.php(797): require('/var/www/html/a...')

Also when entering an ID in the url that is not existing you get a dirty error:

phpMyFAQ Fatal error
Uncaught exception: 'TypeError'

Message: 'phpMyFAQ\Attachment\AttachmentAbstract::getRecordId(): Return value must be of type int, null returned'

Stack trace:

#0 /var/www/html/attachment.php(54): phpMyFAQ\Attachment\AttachmentAbstract->getRecordId()
#1 /var/www/html/index.php(797): require('/var/www/html/a...')
#2 {main}
Thrown in '/var/www/html/src/phpMyFAQ/Attachment/AttachmentAbstract.php' on line 218

The response is still not showing.

from phpmyfaq.

thorsten avatar thorsten commented on September 24, 2024

@RemBdev Do you see a database entry in the table faqattachments for the given ID on the attachment page?

from phpmyfaq.

RemBdev avatar RemBdev commented on September 24, 2024

@thorsten

For the first error i see a record:
image

For the second error i entered on purpuse a non existing id.

from phpmyfaq.

RemBdev avatar RemBdev commented on September 24, 2024

Hi @thorsten ,

When we try to upload a file with your fixes we get now the following error:

Fatal error: Uncaught exception: 'Error'
Message: 'Typed property phpMyFAQ\Attachment\AttachmentAbstract::$id must not be accessed before initialization'
Stack trace:
#0 /var/www/html/src/phpMyFAQ/Attachment/File.php(101): phpMyFAQ\Attachment\AttachmentAbstract->saveMeta()
#1 /var/www/html/admin/api/attachment.php(90): phpMyFAQ\Attachment\File->save('/tmp/phpFRsCwe', 'VEK_MNH_Gebruik...')
#2 /var/www/html/admin/index.php(246): require('/var/www/html/a...')
#3 {main}

Is this difficult to fix?

Best regards!

from phpmyfaq.

thorsten avatar thorsten commented on September 24, 2024

This commit should fix your issue.

from phpmyfaq.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.