Last active
December 22, 2018 06:24
-
-
Save chx/eb71941faae245bbf7d0f20747551c21 to your computer and use it in GitHub Desktop.
https://www.drupal.org/node/2342699 sets $pid to 1 on update, corrupting data in hook_path_update
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
diff --git a/core/lib/Drupal/Core/Path/AliasStorage.php b/core/lib/Drupal/Core/Path/AliasStorage.php | |
index b68984871..34a8ca381 100644 | |
--- a/core/lib/Drupal/Core/Path/AliasStorage.php | |
+++ b/core/lib/Drupal/Core/Path/AliasStorage.php | |
@@ -106,10 +106,10 @@ public function save($source, $alias, $langcode = LanguageInterface::LANGCODE_NO | |
$this->catchException($e); | |
$original = FALSE; | |
} | |
- $query = $this->connection->update(static::TABLE) | |
+ $this->connection->update(static::TABLE) | |
->fields($fields) | |
- ->condition('pid', $pid); | |
- $pid = $query->execute(); | |
+ ->condition('pid', $pid) | |
+ ->execute(); | |
$fields['pid'] = $pid; | |
$fields['original'] = $original; | |
$operation = 'update'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment