fixed issues with empty (#26)
This commit is contained in:
parent
bcfcd15e92
commit
036a16a031
|
@ -212,9 +212,10 @@ function printLabelValue(&$pdf, $valueEntry, $fontName) {
|
||||||
* @param string $fontName font name
|
* @param string $fontName font name
|
||||||
*/
|
*/
|
||||||
function printTable(&$pdf, $table, $fontName) {
|
function printTable(&$pdf, $table, $fontName) {
|
||||||
if (!empty($table->getHeadline())) {
|
$headline = $table->getHeadline();
|
||||||
|
if (!empty($headline)) {
|
||||||
$pdf->SetFont($fontName, 'B', LAMPDF_FONT_SIZE);
|
$pdf->SetFont($fontName, 'B', LAMPDF_FONT_SIZE);
|
||||||
$pdf->Cell(LAMPDF_LABELWIDTH, LAMPDF_LINEHEIGHT, $table->getHeadline() . ':', 0 , 0, 'L', 0);
|
$pdf->Cell(LAMPDF_LABELWIDTH, LAMPDF_LINEHEIGHT, $headline . ':', 0 , 0, 'L', 0);
|
||||||
$pdf->Ln(LAMPDF_LINEHEIGHT);
|
$pdf->Ln(LAMPDF_LINEHEIGHT);
|
||||||
}
|
}
|
||||||
foreach ($table->rows as $row) {
|
foreach ($table->rows as $row) {
|
||||||
|
|
|
@ -66,7 +66,8 @@ catch (\Exception $e) {
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
$twoFactorLabel = empty($config->getTwoFactorAuthenticationLabel()) ? _('PIN+Token') : $config->getTwoFactorAuthenticationLabel();
|
$twoFactorLabelConfig = $config->getTwoFactorAuthenticationLabel();
|
||||||
|
$twoFactorLabel = empty($twoFactorLabelConfig) ? _('PIN+Token') : $twoFactorLabelConfig;
|
||||||
|
|
||||||
if (sizeof($serials) == 0) {
|
if (sizeof($serials) == 0) {
|
||||||
if ($config->getTwoFactorAuthenticationOptional()) {
|
if ($config->getTwoFactorAuthenticationOptional()) {
|
||||||
|
|
|
@ -695,7 +695,8 @@ class LAMConfigTest extends PHPUnit_Framework_TestCase {
|
||||||
* Tests LAMConfig->getJobToken()
|
* Tests LAMConfig->getJobToken()
|
||||||
*/
|
*/
|
||||||
public function testGetJobToken() {
|
public function testGetJobToken() {
|
||||||
$this->assertFalse(empty($this->lAMConfig->getJobToken()));
|
$token = $this->lAMConfig->getJobToken();
|
||||||
|
$this->assertFalse(empty($token));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue