Skip to content
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

Closed
nobodyMO opened this issue Oct 6, 2017 · 8 comments
Closed

PHP Errors after migration to Magento 2.2 and PHP7.1 #22

nobodyMO opened this issue Oct 6, 2017 · 8 comments
Assignees
Labels

Comments

@nobodyMO
Copy link

nobodyMO commented Oct 6, 2017

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:

Warning: A non-numeric value encountered in /var/www/magento/vendor/eadesignro/mpdf/mpdf.php on line 30648

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?

@gewaechshaus
Copy link

Same here!

@eadesignro eadesignro self-assigned this Oct 18, 2017
@eadesignro eadesignro added the bug label Oct 18, 2017
@eadesignro
Copy link
Contributor

@gewaechshaus Hi, we are testing this week on our commercial versions so this will be fixed.

@gewaechshaus
Copy link

gewaechshaus commented Oct 18, 2017

I would also recommend to implement the current mpdf release direclty through mpdf/mpdf...

@eadesignro
Copy link
Contributor

@gewaechshaus hmmm whet release are you referring to? did you test another version? It will be best like that.

@gewaechshaus
Copy link

@eadesignro - Any news on this?

@eadesignro
Copy link
Contributor

@gewaechshaus If time allows it maybe till Monday. Patience.

@gewaechshaus
Copy link

@eadesignro - thanks for updating us!

@eadesignro
Copy link
Contributor

@gewaechshaus This should be ready. Let me know if you find any issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants