Skip to content
This repository
Browse code

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

  • Loading branch information...
commit ea04e7e3f7c8071072d3b8bc6e1712b8124d01ac 1 parent 1c9fae9
Andreas Gohr authored May 20, 2012
10  mpdf/mpdf.php
@@ -9139,13 +9139,13 @@ function _beginpage($orientation,$mgl='',$mgr='',$mgt='',$mgb='',$mgh='',$mgf=''
9139 9139
 
9140 9140
 function _setAutoHeaderHeight(&$det, &$htmlh) {
9141 9141
   if ($this->setAutoTopMargin=='pad') {
9142  
-	if ($htmlh['h']) { $h = $htmlh['h']; }
  9142
+	if (isset($htmlh['h'])) { $h = $htmlh['h']; }
9143 9143
 	else if ($det) { $h = $this->_getHFHeight($det,'H'); }
9144 9144
 	else { $h = 0; }
9145 9145
 	$this->tMargin = $this->margin_header + $h + $this->orig_tMargin;
9146 9146
   }
9147 9147
   else if ($this->setAutoTopMargin=='stretch') {
9148  
-	if ($htmlh['h']) { $h = $htmlh['h']; }
  9148
+	if (isset($htmlh['h'])) { $h = $htmlh['h']; }
9149 9149
 	else if ($det) { $h = $this->_getHFHeight($det,'H'); }
9150 9150
 	else { $h = 0; }
9151 9151
 	$this->tMargin = max($this->orig_tMargin, $this->margin_header + $h + $this->autoMarginPadding);
@@ -9155,14 +9155,14 @@ function _setAutoHeaderHeight(&$det, &$htmlh) {
9155 9155
 
9156 9156
 function _setAutoFooterHeight(&$det, &$htmlf) {
9157 9157
   if ($this->setAutoBottomMargin=='pad') {
9158  
-	if ($htmlf['h']) { $h = $htmlf['h']; }
  9158
+	if (isset($htmlf['h'])) { $h = $htmlf['h']; }
9159 9159
 	else if ($det) { $h = $this->_getHFHeight($det,'F'); }
9160 9160
 	else { $h = 0; }
9161 9161
 	$this->bMargin = $this->margin_footer + $h + $this->orig_bMargin;
9162 9162
 	$this->PageBreakTrigger=$this->h-$this->bMargin ;
9163 9163
   }
9164 9164
   else if ($this->setAutoBottomMargin=='stretch') {
9165  
-	if ($htmlf['h']) { $h = $htmlf['h']; }
  9165
+	if (isset($htmlf['h'])) { $h = $htmlf['h']; }
9166 9166
 	else if ($det) { $h = $this->_getHFHeight($det,'F'); }
9167 9167
 	else { $h = 0; }
9168 9168
 	$this->bMargin = max($this->orig_bMargin, $this->margin_footer + $h + $this->autoMarginPadding);
@@ -32836,4 +32836,4 @@ function SetJS($script) {
32836 32836
 
32837 32837
 
32838 32838
 
32839  
-?>
  32839
+?>
4  plugin.info.txt
... ...
@@ -1,7 +1,7 @@
1 1
 base    dw2pdf
2  
-author  Luigi Micco
  2
+author  Andreas Gohr and Luigi Micco
3 3
 email   l.micco@tiscali.it
4  
-date    2012-05-19
  4
+date    2012-05-20
5 5
 name    Dw2Pdf plugin
6 6
 desc    DokuWiki to PDF converter
7 7
 url     http://www.dokuwiki.org/plugin:dw2pdf

0 notes on commit ea04e7e

Please sign in to comment.
Something went wrong with that request. Please try again.