Commit b973bfaf authored by git's avatar git Committed by iStryker

Issue #3013512 by brtamas: Php 7.2 each() deprecated

parent 3c70b95b
......@@ -91,15 +91,13 @@ function draggableviews_preprocess_views_view_table(&$variables) {
// Add hierarchy.
foreach ($variables['rows'] as $key => $row) {
$columns = array_keys($row['columns']);
// Find the first column that is not the draggableviews field.
do {
$first_column = current($columns);
foreach ($columns as $first_column) {
if ($first_column !== 'draggableviews') {
break;
}
// Set the first column.
$first_column = each($columns);
} while ($first_column);
}
// Indent the first column that is not the draggableviews field.
$columns_title = $row['columns'][$first_column]['content'][0]['field_output']['#markup'];
......
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