Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » RADICORE Installation Issues » PDF error with V 2.28.0
PDF error with V 2.28.0 [message #7846] Mon, 06 May 2024 09:30 Go to next message
htManager is currently offline  htManager
Messages: 431
Registered: May 2014
Senior Member
Hi Tony,

installing the new version 2.28.0 causes the following error when trying to print a pdf.

2024-05-06 10:50:29
Fatal Error: Uncaught exception from TypeError, message = array_map(): Argument #2 ($array) must be of type array, bool given, code=0, file=/var/www/vhosts/mgh-saar.de/includes/tcpdf/include/tcpd f_fonts.php, line=2002 (# 256)
Error in line 510 of file '/var/www/vhosts/mgh-saar.de/includes/error.inc'.

Is this a problem in my code?
Re: PDF error with V 2.28.0 [message #7847 is a reply to message #7846] Tue, 07 May 2024 04:54 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2363
Registered: April 2006
Location: Surrey, UK
Senior Member
There is a line of code in the TCPDF library like this:
$chars = TCPDF_STATIC::pregSplit('//','u', $str, -1, PREG_SPLIT_NO_EMPTY);
which is returning a boolean instead of an array. I don't know why it is doing this, so I have added the following 3 lines after it:
    if (!is_array($chars)) {    // *** AJM 07/05/2024
        $chars = array();       // *** AJM 07/05/2024
    } // if                     // *** AJM 07/05/2024
The amended script is in the attached zip file. Try it and see if it fixes your problem.
  • Attachment: tcpdf.zip
    (Size: 282.85KB, Downloaded 77 times)


Re: PDF error with V 2.28.0 [message #7849 is a reply to message #7847] Wed, 08 May 2024 05:04 Go to previous message
htManager is currently offline  htManager
Messages: 431
Registered: May 2014
Senior Member
Thank you. Works fine now.
Previous Topic: Runtime errors with version 2.25.0
Goto Forum:
  


Current Time: Sun Nov 03 03:03:30 EST 2024

Total time taken to generate the page: 0.00962 seconds