Fatal error: Uncaught TypeError: Return value of Inc\Claz\Export

SimpleInvoices Group Forum Forums Fearless359 SimpleInvoices Discussion Group Fatal error: Uncaught TypeError: Return value of Inc\Claz\Export

Viewing 15 posts - 1 through 15 (of 40 total)
  • Author
    Posts
  • #951
    facer
    Participant

    I get the following error after trying to export to pdf, also I noticed the /library/pdf does not exist inversion: simpleinvoices-master_2019
    My php version is: v7.4.3

    Fatal error: Uncaught TypeError: Return value of Inc\Claz\Export::setFormat() must be an instance of Inc\Claz\void, none returned in /var/www/html/simpleinvoices/Inc/Claz/Export.php:502 Stack trace: #0 /var/www/html/simpleinvoices/modules/export/invoice.php(20): Inc\Claz\Export->setFormat(‘pdf’) #1 /var/www/html/simpleinvoices/index.php(374): include(‘/var/www/html/s…’) #2 {main} thrown in /var/www/html/simpleinvoices/Inc/Claz/Export.php on line 502

    I have no idea what to do to fix it?

    Thx

    • This topic was modified 3 months, 1 week ago by facer.
    #958
    RRowley
    Participant

    You should load master_2019.2. Your PHP version is better served by this version and brings you up to the best, most currently supported version.

    #961
    facer
    Participant

    Thx for your feedback, I did as you suggested I loaded master_2019.2 and deleted the php.log.

    But it spits out a new error:

    UPDATE si_sql_patchmanager SET WHERE sql_id = 454
    [1] => 1064
    [2] => You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘WHERE sql_id = ‘454” at line 3

    Have you got a clue as I haven’t

    thx

    #962
    RRowley
    Participant

    There should be information in the tmp/log/php.log file. Please provide this. Also, in your database check the structure of the si_sql_patchmanager file and verify that the sql_id field exists.

    #964
    facer
    Participant

    I uploaded the php log in zip format as it is forbidden to upload as php.log also a screenshot of database as far as I can see that seems all ok?

    Thank you

    • This reply was modified 3 months, 1 week ago by facer.
    • This reply was modified 3 months, 1 week ago by facer.
    Attachments:
    You must be logged in to view attached files.
    #972
    facer
    Participant

    I still don’t know if the log was uploaded as it gives forbidden to upload for security reasons.

    Anyway I share via the following link: https://justpaste.it/1yb7h

    thx

    • This reply was modified 3 months, 1 week ago by facer.
    Attachments:
    You must be logged in to view attached files.
    #980
    RRowley
    Participant

    I see the error but not how it exists. I’ve attached a zip file that contains and modified SqlPatchManager.php file in it. Extract this into your Inc/Claz directory to replace the version you have. This will write some additional debug information into the tmp/log/php.log file.

    First delete the tmp/log/php.log file. Then run your SI application to replicate the issue. Assuming it fails the same way, zip the tmp/log/php.log file into a zip archive. You can then upload the zip archive to a response on this forum and I’ll look to see if I have any idea what is going on.

    • This reply was modified 3 months ago by RRowley.
    Attachments:
    You must be logged in to view attached files.
    #985
    facer
    Participant

    I did everything as you described and attach the result as zip.

    Attachments:
    You must be logged in to view attached files.
    #1002
    RRowley
    Participant

    I’m flummoxed by this. Attached is a zip file with the PdoDb.php source in it. Put this in the Inc/Claz file same as you did for the SqlPatchManager.php file. Keep the SqlPatchManager.php change in there also. Clear your tmp/log/php.log file (can delete it). Run with these changes and send me the new php.log file. Ignore the extra pdoDb-1.zip file.

    • This reply was modified 3 months ago by RRowley.
    • This reply was modified 3 months ago by RRowley.
    • This reply was modified 3 months ago by RRowley.
    Attachments:
    You must be logged in to view attached files.
    #1010
    facer
    Participant

    I did all you wrote.
    Attached is the php.log.zip.
    Hopefully you will discover what is causing this.

    Attachments:
    You must be logged in to view attached files.
    #1012
    RRowley
    Participant

    That didn’t catch the error. I believe my debug test was wrong and have changed it. Put the PdoDb.php file in the zip attached to this message in the Inc/Claz directory and try again. First clear the php.log file then do the test and give me the php.log from that test.

    Attachments:
    You must be logged in to view attached files.
    #1014
    facer
    Participant

    a new day, New chances 😉

    thx

    Attachments:
    You must be logged in to view attached files.
    #1016
    RRowley
    Participant

    As Bullwinkle used to say, “This time for sure…” Please try again with file in attached file. Note that I modified the attached file name but the file inside is still PdoDb.php. This change will generate more output to the php.log file but hopefully will print what I am looking for.

    Attachments:
    You must be logged in to view attached files.
    #1018
    facer
    Participant

    My daily upload, a fresh log file 😉

    Attachments:
    You must be logged in to view attached files.
    #1020
    RRowley
    Participant

    OK, that gave me some information but not why the logic to set the update value isn’t working. So attached is a zip file for an updated version of PdoDb.php file. Extract this into the Inc/Claz directory, delete your tmp/log/php.log file and test again. Then zip the log file and send it to me.

    Attachments:
    You must be logged in to view attached files.
Viewing 15 posts - 1 through 15 (of 40 total)
  • You must be logged in to reply to this topic.