Check if Valutadatum is found in row 8, when not found do nothing!

This commit is contained in:
Ruben Verhoef 2020-03-17 19:43:03 +01:00
parent b398924706
commit 87d459c5ff

View File

@ -135,9 +135,10 @@ class IngDescription implements SpecificInterface
protected function moveValutadatumDescription(): void
{
$matches = array();
preg_match('/Valutadatum: ([0-9-]+)/', $this->row[8], $matches);
$this->row[9] = date("Ymd", strtotime($matches[1]));
$this->row[8] = preg_replace('/Valutadatum: [0-9-]+/', '', $this->row[8]);
if (preg_match('/Valutadatum: ([0-9-]+)/', $this->row[8], $matches)) {
$this->row[9] = date("Ymd", strtotime($matches[1]));
$this->row[8] = preg_replace('/Valutadatum: [0-9-]+/', '', $this->row[8]);
}
}
/**