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

Array and string offset access syntax with curly braces is no longer supported #39

Open
BrunoDuma opened this issue Apr 3, 2023 · 0 comments

Comments

@BrunoDuma
Copy link

BrunoDuma commented Apr 3, 2023

Estou com problemas quando instancio Pimaco, tenta acessar o array de uma forma que aparentemente nao é mais prmitida pelo PHP

Na linha $this->bodyBackgroundColor{0} == 5, ele retorna o erro do título, acreditot que se estivesse bodyBackgroundColor[0], funcionaria corretamente, vocês ja tiveram relatos desse problema com mais alguem?

Arquivo é o mpdf\mpdf\mpdf.php

if ($this->bodyBackgroundColor) {

		$s .= 'q ' . $this->SetFColor($this->bodyBackgroundColor, true) . "\n";

		if ($this->bodyBackgroundColor{0} == 5) { // RGBa

			$s .= $this->SetAlpha(ord($this->bodyBackgroundColor{4}) / 100, 'Normal', true, 'F') . "\n";

		} elseif ($this->bodyBackgroundColor{0} == 6) { // CMYKa

			$s .= $this->SetAlpha(ord($this->bodyBackgroundColor{5}) / 100, 'Normal', true, 'F') . "\n";

		}

		$s .= sprintf('%.3F %.3F %.3F %.3F re f Q', ($clx * _MPDFK), ($cly * _MPDFK), $clw * _MPDFK, $clh * _MPDFK) . "\n";

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

No branches or pull requests

1 participant