Created
July 18, 2024 20:23
-
-
Save junaidpv/87ddd535057337d37e11efa30e95dc7e to your computer and use it in GitHub Desktop.
Custom patch to help in BWMA migration from D7 to D9. To be removed once the migraiton is over
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/src/Plugin/migrate/process/AddressField.php | |
+++ a/src/Plugin/migrate/process/AddressField.php | |
@@ -19,6 +19,9 @@ | |
* {@inheritdoc} | |
*/ | |
public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) { | |
+ if (empty($value)) { | |
+ return []; | |
+ } | |
$parsed = [ | |
'country_code' => $value['country'], | |
'administrative_area' => $value['administrative_area'], |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment