Skip to content

Commit

Permalink
Fixed issue #7220: PDF Export of Results in Fatal PHP Error
Browse files Browse the repository at this point in the history
  • Loading branch information
Shnoulle committed Jan 24, 2013
1 parent db0327a commit 462ab67
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions application/helpers/admin/exportresults_helper.php
Expand Up @@ -1637,6 +1637,7 @@ public function init(SurveyObj $survey, $sLanguageCode, FormattingOptions $oOpti
$pdfdefaultfont=Yii::app()->getConfig('pdfdefaultfont');
$pdffontsize=Yii::app()->getConfig('pdffontsize');
$pdforientation=Yii::app()->getConfig('pdforientation');
$clang = new limesurvey_lang($sLanguageCode);

if ($oOptions->output=='file')
{
Expand Down Expand Up @@ -1673,6 +1674,7 @@ public function init(SurveyObj $survey, $sLanguageCode, FormattingOptions $oOpti
$this->pdf->AddPage();
$this->pdf->intopdf("PDF export ".date("Y.m.d-H:i", time()));
//Set some pdf metadata
Yii::app()->loadHelper('surveytranslator');
$lg=array();
$lg['a_meta_charset'] = 'UTF-8';
if (getLanguageRTL($sLanguageCode))
Expand All @@ -1683,8 +1685,8 @@ public function init(SurveyObj $survey, $sLanguageCode, FormattingOptions $oOpti
{
$lg['a_meta_dir'] = 'ltr';
}
$lg['a_meta_language'] = $statlangcode;
$lg['w_page']=$statlang->gT("page");
$lg['a_meta_language'] = $sLanguageCode;
$lg['w_page']=$clang->gT("page");
$this->pdf->setLanguageArray($lg);

$this->separator="\t";
Expand Down

0 comments on commit 462ab67

Please sign in to comment.