-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Message: preg_split(): Argument #2 ($subject) must be of type string, array given #635
Comments
Can you share the sample code used to trigger this error? |
|
I'd be curious to know more here. There seems to be more going on than meets the eye. Where does your output buffering start? More importantly, is TCPDF setHeaderData() being used in your code elsewhere, because it seems to be tripping up on a header_string variable that's not actually a string. This would always be a string by default, which is why I ask what other code is being used... |
Here is my source code. If you hit the url |
Sure, take a look at your tcpdf/include/tcpdf_fonts.php file line 2001. The arguments are in the wrong order somehow. Should be:
yours is
No wonder you're having problems! Maybe you should re-load your entire TCPDF library? |
Thank you @sagehenstudio. My issue has been resolved. |
I am using TCPDF with codeigniter 3, and facing these errors.
An uncaught Exception was encountered
Type: TypeError
Message: preg_split(): Argument #2 ($subject) must be of type string, array given
Filename: D:\xampp\htdocs\investus\application\libraries\TCPDF-main\include\tcpdf_static.php
Line Number: 1779
Backtrace:
File: D:\xampp\htdocs\investus\application\libraries\TCPDF-main\include\tcpdf_static.php
Line: 1779
Function: preg_split
File: D:\xampp\htdocs\investus\application\libraries\TCPDF-main\include\tcpdf_fonts.php
Line: 2005
Function: pregSplit
File: D:\xampp\htdocs\investus\application\libraries\TCPDF-main\tcpdf.php
Line: 6408
Function: UTF8StringToArray
File: D:\xampp\htdocs\investus\application\libraries\TCPDF-main\tcpdf.php
Line: 5985
Function: Write
File: D:\xampp\htdocs\investus\application\libraries\TCPDF-main\tcpdf.php
Line: 3510
Function: MultiCell
File: D:\xampp\htdocs\investus\application\libraries\TCPDF-main\tcpdf.php
Line: 3614
Function: Header
File: D:\xampp\htdocs\investus\application\libraries\TCPDF-main\tcpdf.php
Line: 3281
Function: setHeader
File: D:\xampp\htdocs\investus\application\libraries\TCPDF-main\tcpdf.php
Line: 3193
Function: startPage
File: D:\xampp\htdocs\investus\application\controllers\Pdfreport.php
Line: 125
Function: AddPage
File: D:\xampp\htdocs\investus\index.php
Line: 317
Function: require_once
The text was updated successfully, but these errors were encountered: