diff --git a/core/modules/views/src/ViewExecutable.php b/core/modules/views/src/ViewExecutable.php index 991f6c3..2bfb687 100644 --- a/core/modules/views/src/ViewExecutable.php +++ b/core/modules/views/src/ViewExecutable.php @@ -788,7 +788,6 @@ public function setDisplay($display_id = NULL) { // Ensure the requested display exists. if (!$this->displayHandlers->has($display_id)) { - debug(format_string('setDisplay() called with invalid display ID "@display".', array('@display' => $display_id))); return FALSE; } diff --git a/core/modules/views/tests/src/Kernel/ViewExecutableTest.php b/core/modules/views/tests/src/Kernel/ViewExecutableTest.php index 01057b4..28f2c58 100644 --- a/core/modules/views/tests/src/Kernel/ViewExecutableTest.php +++ b/core/modules/views/tests/src/Kernel/ViewExecutableTest.php @@ -195,8 +195,6 @@ public function testSetDisplayWithInvalidDisplay() { $view = Views::getView('test_executable_displays'); $view->initDisplay(); - // Error is triggered while calling the wrong display. - $this->setExpectedException(\PHPUnit_Framework_Error::class); $view->setDisplay('invalid'); $this->assertEqual($view->current_display, 'default', 'If setDisplay is called with an invalid display id the default display should be used.');