Download & Extend

Bug? Error message when CCK select field: text - selection (dropdown list)

Project:Popup
Version:6.x-3.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

When I do in my form field type "text" with widget "selection" (dropdown selection list), almost always two messages appear:

warning: Invalid argument supplied for foreach() in S:\home\mindmanager\www\sites\all\modules\popup\popup_filter\popup_filter.module on line 391.

and

warning: Invalid argument supplied for foreach() in S:\home\mindmanager\www\sites\all\modules\popup\popup_filter\popup_filter.module on line 405.

In the code one can see that really it relates to "selection" (options):

function popup_filter_ajax_getdeltas($module){

  $options = '';
  $blocks = module_invoke($module, 'block', 'list');
  foreach($blocks as $delta=>$data){
    $options .= '<option value="' . $delta . '">' . $data['info'] . '</option>';
  }

  print $options;
  exit;
}

function popup_filter_ajax_getdisplays($view_name){

  $view = views_get_view($view_name);
  foreach($view->display as $id=>$display){
    $options .= '<option value="' . $id . '">' . $display->display_title . '</option>';
  }

These messages appear not only on the formp page, but also on many other pages - even those where there are no select fields. When I disable select fields from forms - these massages not appear...

How can I fix this issue?

Comments

#1

Status:active» patch (to be ported)

This patch should fix it.

AttachmentSize
popup-filter-852710.patch 1.04 KB

#2

Status:patch (to be ported)» fixed

#3

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.