diff --git a/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php b/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php index 701b6f9..75ab3d5 100644 --- a/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php +++ b/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php @@ -21,6 +21,7 @@ use Drupal\Core\Language\LanguageManagerInterface; use Drupal\Core\Plugin\Discovery\AnnotatedClassDiscovery; use Drupal\Core\Plugin\Factory\ContainerFactory; +use \Symfony\Component\Debug\Exception\FlattenException; /** * Base class for plugin managers. @@ -259,7 +260,7 @@ public function createInstance($plugin_id, array $configuration = array()) { catch (PluginException $exception) { if ($fallback_plugin_id = $this->getFallbackPluginId($plugin_id, $configuration)) { // Allow implementations show the exception message. - $configuration['_exception'] = $exception; + $configuration['_exception'] = new FlattenException($exception); $instance = $this->factory->createInstance($this->getFallbackPluginId($plugin_id, $configuration), $configuration); } else { diff --git a/core/modules/views/src/Plugin/ViewsHandlerManager.php b/core/modules/views/src/Plugin/ViewsHandlerManager.php index acda778..93b1724 100644 --- a/core/modules/views/src/Plugin/ViewsHandlerManager.php +++ b/core/modules/views/src/Plugin/ViewsHandlerManager.php @@ -110,7 +110,7 @@ public function getHandler($item, $override = NULL) { } // @todo This is crazy. Find a way to remove the override functionality. - $plugin_id = $override ? : $definition['id']; + $plugin_id = $override ?: $definition['id']; // Try to use the overridden handler. try { return $this->createInstance($plugin_id, $definition);