vendredi 10 novembre 2017

"A non-numeric value encountered" laravel5.1 php7.1 dompdf 0.8

I understood that this error was already solved but i don't manage to fix it, so sorry and thanks for your advises: I'm working on a Laravel 5.1 project (FusionInvoice) and use dompdf to create pdf files. My aim is to use php7.1 for this project.

After enable php7.1 I had the "A non-numeric value encountered" error so i did the easy installation procedure of dompdf, with composer method (http://ift.tt/13J3PJw) to fix it using the dompdf 0.8.1 release. My requierements seems ok.

Now i have this error:

FatalThrowableError in domPDF.php line 30: Class 'DOMPDF' not found

we are talking about this file "app/Support/PDF/Drivers/domPDF.php" and this function:

private function getPdf($html)
    {
        $pdf = new \DOMPDF();
        $pdf->set_paper($this->paperSize, $this->paperOrientation);
        $pdf->load_html($html);
        $pdf->render();

        return $pdf;
    }

I understood that the "new \DOMPDF();" is calling this file '/vendor/dompdf/dompdf/src/Dompdf.php' to build his object. so i tried this : "new \Dompdf\Dompdf();"

and i'm back to the first place:

ErrorException in Page.php line 499: A non-numeric value encountered

Does someone knows how i can solve this issue ? Thanks...



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire