Skip to content
Snippets Groups Projects
Commit 382c843b authored by Aaron Bauman's avatar Aaron Bauman Committed by Aaron Bauman
Browse files

Issue #2960813 by aaronbauman: Salesforce mapping warning on Webform submission view page

parent 52685c53
No related branches found
No related tags found
No related merge requests found
...@@ -20,6 +20,9 @@ class MappedObjectController extends ControllerBase { ...@@ -20,6 +20,9 @@ class MappedObjectController extends ControllerBase {
// There must be a better way to get the entity from a route match. // There must be a better way to get the entity from a route match.
$param = current(\Drupal::routeMatch()->getParameters()->all()); $param = current(\Drupal::routeMatch()->getParameters()->all());
if (!is_object($param)) {
return AccessResult::forbidden();
}
$implements = class_implements($param); $implements = class_implements($param);
if (empty($implements['Drupal\Core\Entity\EntityInterface'])) { if (empty($implements['Drupal\Core\Entity\EntityInterface'])) {
return AccessResult::forbidden(); return AccessResult::forbidden();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment