Skip to content

Commit 45103cc

Browse files
authored
Merge pull request #195 from mikehaertl/194-fix-empty-error
Issue #194 Fix empty error messages
2 parents 793c08b + 14ab5f1 commit 45103cc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Pdf.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,7 @@ public function getData($utf8 = true)
376376
$command = $this->getCommand();
377377
$command->setOperation($utf8 ? 'dump_data_utf8' : 'dump_data');
378378
if (!$command->execute()) {
379+
$this->_error = $command->getError();
379380
return false;
380381
} else {
381382
$this->$property = new InfoFields(trim($command->getOutput()));
@@ -397,6 +398,7 @@ public function getDataFields($utf8 = true)
397398
$command = $this->getCommand();
398399
$command->setOperation($utf8 ? 'dump_data_fields_utf8' : 'dump_data_fields');
399400
if (!$command->execute()) {
401+
$this->_error = $command->getError();
400402
return false;
401403
} else {
402404
$this->$property = new DataFields(trim($command->getOutput()));

0 commit comments

Comments
 (0)