Code Monkey home page Code Monkey logo

Comments (10)

finwe avatar finwe commented on July 24, 2024 1

Great, thanks, now remove the code that does not cause this :)

from mpdf.

fglueck avatar fglueck commented on July 24, 2024 1

shortes example than I can extract

from mpdf.

finwe avatar finwe commented on July 24, 2024 1

Great. Now that I could see what caused the issue really, I was able to fix the issue in the place it originated from instead of just slapping a bunch of isset calls into the code. The fix is in the development branch.

from mpdf.

fglueck avatar fglueck commented on July 24, 2024

There is a coding error and you close it only?
You can see that you set $vector to NULL:
$vetor = isset($arrayaux[$i]) ? $arrayaux[$i] : null;

And then you will access $vector as ARRAY, but it isn't:
if ($i == 0 && $vetor[0] != "\n" && ! $this->ispre) {

So why you close the ticket a completed, but current code on git dont solve the isue?

from mpdf.

finwe avatar finwe commented on July 24, 2024

You haven't provided a reproducible code example. There is no point for this to be open unless it can be reproduced.

from mpdf.

fglueck avatar fglueck commented on July 24, 2024

But you can certainly confirm that it is not a good idea to use NULL as an array and that there is a condition missing here that gets around the problem. Like:

$vector !== null && $vetor[0] != "\n"
or
!is_null(....

from mpdf.

finwe avatar finwe commented on July 24, 2024

Sure. But I want to have a demonstration of what code is causing this.

from mpdf.

fglueck avatar fglueck commented on July 24, 2024
  <html lang="de">
  <head>
    <style type="text/css">.fakeinput { padding: 1px 3px 1px 3px; margin-top: 1px; background-color: white; border: 1px lightgrey solid; min-height: 12px; }</style>
  </head>
  <body>
  <table cellpadding="3" width="920px">
    <tr>
      <td style="text-align:center;">
        <div >KV mit Prognose:
          <span class="fakeinput bold">0</span>
        </div>
      </td>
      </tr>
    </table>
  </body>
</html>

from mpdf.

fglueck avatar fglueck commented on July 24, 2024

I'm sorry but I got:
Warning: Trying to access array offset on value of type null: Line: 16141 In: cockpit\inc\vendor\mpdf\mpdf\src\Mpdf.php

I install just 2 minutes ago with composer:
Upgrading mpdf/mpdf (v8.2.3 => dev-master 6f723a9): Extracting archive

But I can confirm that some CSS better set, like:
#report .subheader >bold { ... }


PS: I saw:
last update Mpdf.php was yesterday. So I think it is noch checked in.

from mpdf.

finwe avatar finwe commented on July 24, 2024

The fix is in the development branch. It is not released yet.

from mpdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.