Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed problems with illegal string offsets in PHP 5.4. fixes #25

  • Loading branch information...
commit ea04e7e3f7c8071072d3b8bc6e1712b8124d01ac 1 parent 1c9fae9
@splitbrain authored
Showing with 7 additions and 7 deletions.
  1. +5 −5 mpdf/mpdf.php
  2. +2 −2 plugin.info.txt
View
10 mpdf/mpdf.php
@@ -9139,13 +9139,13 @@ function _beginpage($orientation,$mgl='',$mgr='',$mgt='',$mgb='',$mgh='',$mgf=''
function _setAutoHeaderHeight(&$det, &$htmlh) {
if ($this->setAutoTopMargin=='pad') {
- if ($htmlh['h']) { $h = $htmlh['h']; }
+ if (isset($htmlh['h'])) { $h = $htmlh['h']; }
else if ($det) { $h = $this->_getHFHeight($det,'H'); }
else { $h = 0; }
$this->tMargin = $this->margin_header + $h + $this->orig_tMargin;
}
else if ($this->setAutoTopMargin=='stretch') {
- if ($htmlh['h']) { $h = $htmlh['h']; }
+ if (isset($htmlh['h'])) { $h = $htmlh['h']; }
else if ($det) { $h = $this->_getHFHeight($det,'H'); }
else { $h = 0; }
$this->tMargin = max($this->orig_tMargin, $this->margin_header + $h + $this->autoMarginPadding);
@@ -9155,14 +9155,14 @@ function _setAutoHeaderHeight(&$det, &$htmlh) {
function _setAutoFooterHeight(&$det, &$htmlf) {
if ($this->setAutoBottomMargin=='pad') {
- if ($htmlf['h']) { $h = $htmlf['h']; }
+ if (isset($htmlf['h'])) { $h = $htmlf['h']; }
else if ($det) { $h = $this->_getHFHeight($det,'F'); }
else { $h = 0; }
$this->bMargin = $this->margin_footer + $h + $this->orig_bMargin;
$this->PageBreakTrigger=$this->h-$this->bMargin ;
}
else if ($this->setAutoBottomMargin=='stretch') {
- if ($htmlf['h']) { $h = $htmlf['h']; }
+ if (isset($htmlf['h'])) { $h = $htmlf['h']; }
else if ($det) { $h = $this->_getHFHeight($det,'F'); }
else { $h = 0; }
$this->bMargin = max($this->orig_bMargin, $this->margin_footer + $h + $this->autoMarginPadding);
@@ -32836,4 +32836,4 @@ function SetJS($script) {
-?>
+?>
View
4 plugin.info.txt
@@ -1,7 +1,7 @@
base dw2pdf
-author Luigi Micco
+author Andreas Gohr and Luigi Micco
email l.micco@tiscali.it
-date 2012-05-19
+date 2012-05-20
name Dw2Pdf plugin
desc DokuWiki to PDF converter
url http://www.dokuwiki.org/plugin:dw2pdf
Please sign in to comment.
Something went wrong with that request. Please try again.