mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix #2841 (again)
This commit is contained in:
parent
5e348e7a40
commit
4ae7501114
@ -319,7 +319,7 @@ class ImportArrayStorage
|
|||||||
private function getHash(array $transaction): string
|
private function getHash(array $transaction): string
|
||||||
{
|
{
|
||||||
unset($transaction['import_hash_v2'], $transaction['original_source']);
|
unset($transaction['import_hash_v2'], $transaction['original_source']);
|
||||||
$json = json_encode($transaction);
|
$json = json_encode($transaction, JSON_THROW_ON_ERROR);
|
||||||
if (false === $json) {
|
if (false === $json) {
|
||||||
// @codeCoverageIgnoreStart
|
// @codeCoverageIgnoreStart
|
||||||
/** @noinspection ForgottenDebugOutputInspection */
|
/** @noinspection ForgottenDebugOutputInspection */
|
||||||
@ -332,8 +332,9 @@ class ImportArrayStorage
|
|||||||
}
|
}
|
||||||
// @codeCoverageIgnoreEnd
|
// @codeCoverageIgnoreEnd
|
||||||
}
|
}
|
||||||
|
|
||||||
$hash = hash('sha256', $json);
|
$hash = hash('sha256', $json);
|
||||||
Log::debug(sprintf('The hash is: %s', $hash));
|
Log::debug(sprintf('The hash is: %s', $hash), $transaction);
|
||||||
|
|
||||||
return $hash;
|
return $hash;
|
||||||
}
|
}
|
||||||
@ -484,7 +485,7 @@ class ImportArrayStorage
|
|||||||
/** @noinspection DisconnectedForeachInstructionInspection */
|
/** @noinspection DisconnectedForeachInstructionInspection */
|
||||||
Log::debug('Comparing current transaction source+dest names', $transactionSourceNames);
|
Log::debug('Comparing current transaction source+dest names', $transactionSourceNames);
|
||||||
Log::debug('.. with current transfer source+dest names', $transferSource);
|
Log::debug('.. with current transfer source+dest names', $transferSource);
|
||||||
if ($transactionSourceNames === $transferSource) {
|
if ($transactionSourceNames === $transferSource && $transferSource !== ['', '']) {
|
||||||
// @codeCoverageIgnoreStart
|
// @codeCoverageIgnoreStart
|
||||||
++$hits;
|
++$hits;
|
||||||
Log::debug(sprintf('Source names are the same! (%d)', $hits));
|
Log::debug(sprintf('Source names are the same! (%d)', $hits));
|
||||||
|
Loading…
Reference in New Issue
Block a user