Problem in certain scenarios when using cck_field_perms

skassam - April 22, 2008 - 17:24
Project:Unique field
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

I have an error when using cck_field_perms in the situation where a certain user does not have access to edit a certain field and the field is also used for unique_field.

The error is:
Invalid argument supplied for foreach() in /home/agile/public_html/sites/all/modules/unique_field/unique_field.module on line 177.

I hope to get some feedback on my fix before I create a patch but in function "unique_field_match_value" i added this as the first line:
if (!isset($values)) {return array();}

From my quick digging around it looked like if $values is not set then the user does not have access to that field. Any feedback is appreciated.

Thanks!

#1

detour - March 30, 2009 - 20:45
Status:active» fixed

Hi skassam,

Thanks for reporting this issue. Compatibility with cck_field_perms (for Drupal 5 and content_permissions for Drupal 6) should be fixed in version 1.0 of this module.

#2

System Message - April 13, 2009 - 20:50
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.