logo       

[bug] node.module does operations during filtering when it shouldn't and ge: msg#01007

php.drupal.devel

Subject: [bug] node.module does operations during filtering when it shouldn't and generates PHP error upon empty filtered list

Project: Drupal
Version: 4.3.2
Component: node.module
Category: bug reports
Priority: normal
Assigned to: Anonymous
Reported by: jik
Updated by: jik
Status: active
Attachment: http://drupal.org/files/issues/_8drupal (1.53 KB)

The code in node_admin_nodes puts the "Filter options" and "Update
options" drop-downs in the same form. As a result,
$_POST["edit"]["operation"] is always set, even if the user actually
clicked the Go button next to the filter option, i.e., he wanted to
change the filtering rather than performing an operation. This means
that nodes which the user did not intend to be modified could end up
being modified.

Another problem is that if the previous filter didn't return any
results, then clicking go next to the "Update options" drop-down will
cause a PHP error because of an empty foreach argument.

The attached patch, which is against 4.3.2 but should apply easily to
the trunk, fixes both of these issues.


jik

--
View: http://drupal.org/node/view/6089
Edit: http://drupal.org/project/comments/add/6089





<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise