Comments (10)
Great, thanks, now remove the code that does not cause this :)
from mpdf.
shortes example than I can extract
from mpdf.
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.
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.
You haven't provided a reproducible code example. There is no point for this to be open unless it can be reproduced.
from mpdf.
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.
Sure. But I want to have a demonstration of what code is causing this.
from mpdf.
<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.
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.
The fix is in the development branch. It is not released yet.
from mpdf.
Related Issues (20)
- htmlpagefooter element does not respect z-index HOT 4
- Error in pdf generation - Invalid argument supplied for foreach()
- Document structure is invalid or damaged HOT 6
- Getting Fatal error sometimes with the ColorConverter HOT 2
- Attribute value truncated when containing double quote character and using single quote delimiter
- Warning: Undefined array key "s" HOT 6
- Nesting a table inside a tfoot element results in "Trying to access array offset on null"
- PDF/A : endobj is missing EOL-Marker
- ArrayAccess::offsetSet()" might add "void" as a native return type
- Error while trying to save pdf to a folder. HOT 1
- Write HTML - NOTICE Uninitialized string offset - XXXX on Otl.php HOT 1
- Subsequent calls to Output() of pdf with images are missing images in 2++ data HOT 1
- SELECT don't show selected element HOT 6
- Signed PDF doesn't show signature
- Font size in absolute positioned div depends on position on page
- MPDF "Trying to access array offset on null" error during pdf generation
- Documentation Update Needed for Margin Property Syntax Change in mPDF Version 8 HOT 1
- Bug Report HOT 1
- Set margin-left and margin-right in @page :first { ... }
- text-align: justify add spases between letters not words
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mpdf.