Skip to content

Instantly share code, notes, and snippets.

@huyby
Last active May 18, 2017 10:01
Show Gist options
  • Save huyby/2c9a23c14a310580f7d9098875bfacdc to your computer and use it in GitHub Desktop.
Save huyby/2c9a23c14a310580f7d9098875bfacdc to your computer and use it in GitHub Desktop.
Patch fieldable_path drupal module https://www.drupal.org/node/2879375
--- ./src/Controller/FieldablePathController.php 2017-05-18 11:51:40.000000000 +0200
+++ ./src/Controller/FieldablePathController.php 2017-05-18 11:59:01.000000000 +0200
@@ -43,7 +43,7 @@
->load($params[$entity_type]);
// Make sure the current entity exists and contains path field.
- if (empty($entity) || !$entity->hasField('path')) {
+ if (empty($entity) || !(method_exists($entity, 'hasField') && $entity->hasField('path'))) {
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment