-
Notifications
You must be signed in to change notification settings - Fork 60
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
PHP Errors after migration to Magento 2.2 and PHP7.1 #22
Comments
Same here! |
@gewaechshaus Hi, we are testing this week on our commercial versions so this will be fixed. |
I would also recommend to implement the current mpdf release direclty through mpdf/mpdf... |
@gewaechshaus hmmm whet release are you referring to? did you test another version? It will be best like that. |
@eadesignro - Any news on this? |
@gewaechshaus If time allows it maybe till Monday. Patience. |
@eadesignro - thanks for updating us! |
@gewaechshaus This should be ready. Let me know if you find any issue. |
After the migration to Magento 2.2 and PHP 7.1 I got PHP errors in the mpdf library files.
File cssmgr.php method MergeCSS tries to set $attr['ID'] for not initialized variables.
I fixed it locally by changing
if (!isset($attr['ID'])) { $attr['ID'] = ''; }
to
if (!isset($attr['ID'])) { if (!is_array($attr)) { $attr=array("ID"=> ''); } else { $attr['ID'] = ''; } }
File mpdf.php method ConvertSize has an implicit cast from string to float, witch results to the following error message:
I fixed it locally by changing
`
}} else {
$size *= (25.4 / $this->dpi); //nothing == px
}
`
to
`
} elseif (is_numeric ($size)) {
$size *= (25.4 / $this->dpi); //nothing == px
} else {
$size = floatval ($size *(25.4 / $this->dpi); //nothing == px
}
`
Is it possible to upgrade EaDesgin/mpdf to the current branch of mpdf/mpdf?
The text was updated successfully, but these errors were encountered: