Commit fe37dc85 authored by generalredneck's avatar generalredneck

Fixing notice 'Notice: Undefined index: nodes in...

Fixing notice 'Notice: Undefined index: nodes in views_natural_sort_rebuild_index_finished() (line 146 of /var/www/example/sites/all/modules/views_natural_sort/views_natural_sort.admin.inc).'
parent 74da1edb
......@@ -107,12 +107,13 @@ function views_natural_sort_rebuild_index(&$context) {
array('max' => $sandbox['max'])
)->fetchField();
$sandbox['current'] = 0;
$context['results']['nodes'] = 0;
if ($sandbox['total'] == 0) {
$context['finished'] = 1;
return;
}
$sandbox['current'] = 0;
$context['results']['nodes'] = 0;
}
$results = db_query_range(
......
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