title: Upgrade to PHP7.1 and MPDF show error - A non-numeric value encountered at line 30648
body: <p>I'm using PHP 5.x and mPDF 6.x for long time.</p>
  
  <p>This week I decide to upgrade system to PHP7.1 but still using mPDF6.</p>
  
  <p>I face some problem after upgrading.</p>
  
  <p>PROBLEM 1::</p>
  
  <p>Console show error message: constructer with the same name as class name is deprecate.</p>
  
  <blockquote>
    <blockquote>
      <p>I go through each php files and find classes, then replace constructer function with __construct(...)</p>
    </blockquote>
  </blockquote>
  
  <p>PROBLEM 2::</p>
  
  <p>Console show error message:: Can not assign property ID to $attr
  I go to file mPDF.php in function MergeCSS(...). I add new line of code at third line.</p>
  
  <blockquote>
    <blockquote>
      <p>if (empty($attr)) { $attr = array();}</p>
    </blockquote>
  </blockquote>
  
  <p>PROBLEM 3::</p>
  
  <p>Console show error message following this::
  "A non-numeric value encountered" at line 30648."</p>
  
  <p>My solution to solve this problem is just::</p>
  
  <ol>
  <li>replace mPDF->ConvertSize() function in mPDF.php file with coding from MPDF7. 
  
  <blockquote>
    <blockquote>
      <p>By replace function ConvertSize() with function ConvertSize() and multiplyFontSize();</p>
    </blockquote>
  </blockquote></li>
  </ol>
  
  <p><a href="https://github.com/mpdf/mpdf/blob/development/src/SizeConverter.php" rel="noreferrer">https://github.com/mpdf/mpdf/blob/development/src/SizeConverter.php</a></p>
  
  <ol start="2">
  <li>Add constant to mPDF class </li>
  </ol>
  
  <blockquote>
    <blockquote>
      <p>const SCALE = 72 / 25.4;</p>
    </blockquote>
  </blockquote>
  
  <p>Hope this help for someone who face this problem.</p>