Skip to content

Commit

Permalink
Merge pull request #241 from techdivision/pac-840-type-error
Browse files Browse the repository at this point in the history
Type Error
  • Loading branch information
Mardl authored Dec 22, 2023
2 parents ce1d41f + 21ae6d0 commit 7e39d72
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Version 17.7.1

## Bugfixes

* Fix type error in getOriginalData Function

# Version 17.7.0

## Feature
Expand Down
14 changes: 9 additions & 5 deletions src/Subjects/AbstractSubject.php
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ public function import($serial, $filename)

$inProgressFilename = '';
$failedFilename = '';

try {
// initialize the serial/filename
$this->setSerial($serial);
Expand Down Expand Up @@ -1400,7 +1400,7 @@ public function getOriginalData()
}

// return an empty array, if not
return $originalData;
return is_array($originalData) ? $originalData : array();
}

/**
Expand Down Expand Up @@ -1438,11 +1438,15 @@ public function wrapException(
// load the original data
$originalData = $this->getOriginalData();

// replace old filename and line number of the original message
// append filename and line number to the original message
$message = $this->appendExceptionSuffix(
$this->stripExceptionSuffix($message),
$originalData[ColumnKeys::ORIGINAL_FILENAME],
$originalData[ColumnKeys::ORIGINAL_LINE_NUMBER]
isset($originalData[ColumnKeys::ORIGINAL_FILENAME]) ?
$originalData[ColumnKeys::ORIGINAL_FILENAME] :
$this->filename,
isset($originalData[ColumnKeys::ORIGINAL_LINE_NUMBER]) ?
$originalData[ColumnKeys::ORIGINAL_LINE_NUMBER] :
$this->lineNumber
);
} else {
// append filename and line number to the original message
Expand Down

0 comments on commit 7e39d72

Please sign in to comment.