-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
PHP8 errors and several other fixes #265
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
Conversation
…h would've resulted in errors
Co-authored-by: William Desportes <williamdes@wdes.fr>
Fixes: #222 @nicolaasuni could you please have a look ? |
any news ? |
someone alive?) |
I can't give any information, it's now maintainers turn. |
@@ -1136,7 +1136,7 @@ public static function extractCSSproperties($cssdata) { | |||
* @see setHtmlVSpace() | |||
* @public static | |||
*/ | |||
public static function fixHTMLCode($html, $default_css='', $tagvs='', $tidy_options='', &$tagvspaces) { | |||
public static function fixHTMLCode($html, $default_css, $tagvs, $tidy_options, &$tagvspaces) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems a braking change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, its not. The last Parameter was never optional, so all user code must have defined those parameters. So all code use this function have already those params.
@@ -470,7 +470,7 @@ protected function get255StateCodeword($cwpad, $cwpos) { | |||
* Returns true if the char belongs to the selected mode | |||
* @param $chr (int) Character (byte) to check. | |||
* @param $mode (int) Current encoding mode. | |||
* @return boolean true if the char is of the selected mode. | |||
* @return bool true if the char is of the selected mode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of fixing these barcode functions it would probably be easier to just import the new tc-lib-barcode library that is ready.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would that be a breaking change?
@@ -1136,7 +1136,7 @@ public static function extractCSSproperties($cssdata) { | |||
* @see setHtmlVSpace() | |||
* @public static | |||
*/ | |||
public static function fixHTMLCode($html, $default_css='', $tagvs='', $tidy_options='', &$tagvspaces) { | |||
public static function fixHTMLCode($html, $default_css, $tagvs, $tidy_options, &$tagvspaces) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a breaking change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, its not. The last Parameter was never optional, so all user code must have defined those parameters. So all code use this function have already those params.
$w = $w; | ||
break; | ||
} | ||
case 'L': { | ||
if ($this->rtl) { | ||
$w = $w; | ||
} else { | ||
if (!$this->rtl) { | ||
$w = $l; | ||
} | ||
break; | ||
} | ||
case 'R': { | ||
if ($this->rtl) { | ||
$w = $l; | ||
} else { | ||
$w = $w; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems another breaking change?
@@ -7779,16 +7777,16 @@ public function _destroy($destroyall=false, $preserve_objcopy=false) { | |||
// remove all temporary files | |||
if ($handle = @opendir(K_PATH_CACHE)) { | |||
while ( false !== ( $file_name = readdir( $handle ) ) ) { | |||
if (strpos($file_name, '__tcpdf_'.$this->file_id.'_') === 0) { | |||
if (strpos($file_name, '__tcpdf_'.$this->file_id.'_') === 0 && file_exists(K_PATH_CACHE.$file_name)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
file_exists is a security issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you explain why, it would be interesting :)
@@ -1136,7 +1136,7 @@ public static function extractCSSproperties($cssdata) { | |||
* @see setHtmlVSpace() | |||
* @public static | |||
*/ | |||
public static function fixHTMLCode($html, $default_css='', $tagvs='', $tidy_options='', &$tagvspaces) { | |||
public static function fixHTMLCode($html, $default_css, $tagvs, $tidy_options, &$tagvspaces) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://stackoverflow.com/a/16636807/5155484
public static function fixHTMLCode($html, $default_css, $tagvs, $tidy_options, &$tagvspaces) { | |
public static function fixHTMLCode($html, $default_css = '', $tags = '', $tidy_options = '', &$tagvspaces = null) { |
I think according to https://stackoverflow.com/a/16636807/5155484 it could be set to null the default parameters to not introduce bc breaks |
#293 was merged and did out-date this pull-request |
Ok, i am out of this library. I did my best to help. Cya. |
I made the change that you propose, but I still get the error with export from phpMyAdmin ( from xampp distrib / windows). |
I just reproduce the pb :
with phpMyAdmin Version : 4.9.7 thank for any help, |
Resent to main branch as noted here #244 (comment)