Issue #3221933 by marcoscano, alexpott, owenbush: PHP Notice when using "left_formula" in views join
parent
3e4b17a7c9
commit
0926b0cc7c
|
@ -266,7 +266,11 @@ class JoinPluginBase extends PluginBase implements JoinPluginInterface {
|
|||
}
|
||||
|
||||
$this->leftTable = $configuration['left_table'];
|
||||
$this->leftField = $configuration['left_field'];
|
||||
|
||||
if (!empty($configuration['left_field'])) {
|
||||
$this->leftField = $configuration['left_field'];
|
||||
}
|
||||
|
||||
$this->field = $configuration['field'];
|
||||
|
||||
if (!empty($configuration['left_formula'])) {
|
||||
|
|
|
@ -205,6 +205,8 @@ class JoinTest extends RelationshipJoinTestBase {
|
|||
|
||||
// Test that joins using 'left_formula' are properly built.
|
||||
$configuration['left_formula'] = 'MAX(views_test_data.uid)';
|
||||
// When 'left_formula' is present, 'left_field' is no longer required.
|
||||
unset($configuration['left_field']);
|
||||
$join = $this->manager->createInstance('standard', $configuration);
|
||||
$table = ['alias' => 'users6'];
|
||||
$join->buildJoin($query, $table, $view->query);
|
||||
|
|
Loading…
Reference in New Issue