Unverified Commit 566b7aa1 authored by alexpott's avatar alexpott

Issue #2904847 by mglaman, vaplas: Replace debug() statements in Views

parent c7b8d938
......@@ -185,7 +185,13 @@ protected function addAdditionalFields($fields = NULL) {
}
if (empty($table_alias)) {
debug(t('Handler @handler tried to add additional_field @identifier but @table could not be added!', ['@handler' => $this->definition['id'], '@identifier' => $identifier, '@table' => $info['table']]));
trigger_error(sprintf(
"Handler % tried to add additional_field %s but % could not be added!",
$this->definition['id'],
$identifier,
$info['table']
), E_USER_WARNING);
$this->aliases[$identifier] = 'broken';
continue;
}
......
......@@ -56,8 +56,8 @@ public function attachTo(array &$build, $display_id, Url $feed_url, $title) {
*/
public function render() {
if (empty($this->view->rowPlugin)) {
debug('Drupal\views\Plugin\views\style\Opml: Missing row plugin');
return;
trigger_error('Drupal\views\Plugin\views\style\Opml: Missing row plugin', E_WARNING);
return [];
}
$rows = [];
......
......@@ -98,7 +98,7 @@ public function getDescription() {
public function render() {
if (empty($this->view->rowPlugin)) {
debug('Drupal\views\Plugin\views\style\Rss: Missing row plugin');
trigger_error('Drupal\views\Plugin\views\style\Rss: Missing row plugin', E_WARNING);
return [];
}
$rows = [];
......
......@@ -457,8 +457,8 @@ protected function renderRowGroup(array $rows = []) {
*/
public function render() {
if ($this->usesRowPlugin() && empty($this->view->rowPlugin)) {
debug('Drupal\views\Plugin\views\style\StylePluginBase: Missing row plugin');
return;
trigger_error('Drupal\views\Plugin\views\style\StylePluginBase: Missing row plugin', E_WARNING);
return [];
}
// Group the rows according to the grouping instructions, if specified.
......
......@@ -28,7 +28,7 @@ class ModuleTest extends ViewsKernelTestBase {
public static $modules = ['field', 'user', 'block'];
/**
* Stores the last triggered error, for example via debug().
* Stores the last triggered error.
*
* @var string
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment