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

merge-requests/1654/head
Alex Pott 2018-06-04 13:27:55 +01:00
parent c7b8d93878
commit 566b7aa1bb
No known key found for this signature in database
GPG Key ID: 31905460D4A69276
5 changed files with 13 additions and 7 deletions

View File

@ -185,7 +185,13 @@ abstract class FieldPluginBase extends HandlerBase implements FieldHandlerInterf
}
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;
}

View File

@ -56,8 +56,8 @@ class Opml extends StylePluginBase {
*/
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 = [];

View File

@ -98,7 +98,7 @@ class Rss extends StylePluginBase {
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 = [];

View File

@ -457,8 +457,8 @@ abstract class StylePluginBase extends PluginBase {
*/
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.

View File

@ -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
*