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!

Comments

arithmetric’s picture

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.

Status: Fixed » Closed (fixed)

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