From 0a61c510e1b7ecc589200176b3556de9905b12b2 Mon Sep 17 00:00:00 2001 From: Raul Perusquia Date: Sun, 6 Oct 2024 04:47:22 +0800 Subject: [PATCH] #928 Fetch Aurora History (hack deal double spaces) --- app/Transfers/Aurora/WithParseUpdateHistory.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Transfers/Aurora/WithParseUpdateHistory.php b/app/Transfers/Aurora/WithParseUpdateHistory.php index 91c97dab4c..467263be2a 100644 --- a/app/Transfers/Aurora/WithParseUpdateHistory.php +++ b/app/Transfers/Aurora/WithParseUpdateHistory.php @@ -19,6 +19,10 @@ protected function parseHistoryUpdatedOldValues($auditable): array $field = $this->getField(); $haystack = $this->auroraModelData->{'History Details'}; + + + $haystack = trim(preg_replace('/\s+/', ' ', $haystack)); + if (preg_match('/
Old value:<\/div>
(.*)<\/div><\/div>/', $haystack, $matches)) { $oldValues = $this->extractFromTable($matches, $oldValues, $field, $auditable); } elseif (preg_match('/
Alter Wert:<\/div>
(.*)<\/div><\/div>/', $haystack, $matches)) {