php fixing mini error of TCPDF in line 16498: Undefined index: thread -


there error may occur in creating pdf , need face it.

php version 5.3

tcpdf version 6.2

if (($dom[$key]['value'] == 'table') , (!tcpdf_static::empty_string($dom[($dom[$key]['parent'])]['thead'])) )     {          $dom[($dom[$key]['parent'])]['thead'] = str_replace(' nobr="true"', '', $dom[($dom[$key]['parent'])]['thead']);         $dom[($dom[$key]['parent'])]['thead'] .= '</tablehead>';    } 

here solution need check array element.

if (array_key_exists ('thead',$dom[($dom[$key]['parent'])])) {                     if (($dom[$key]['value'] == 'table') , (!tcpdf_static::empty_string($dom[($dom[$key]['parent'])]['thead'])) ) {                     $dom[($dom[$key]['parent'])]['thead'] = str_replace(' nobr="true"', '', $dom[($dom[$key]['parent'])]['thead']);                     $dom[($dom[$key]['parent'])]['thead'] .= '</tablehead>';                     } } 

Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -