Error when no roles have permission to upload files
webchick - May 31, 2008 - 23:18
| Project: | Upload Permissions Per Content Type |
| Version: | 6.x-1.0-beta1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Dave.Ingram |
| Status: | active |
Description
When there are no additional roles beyond anonymous and authenticated, you get the following at the settings page:
* warning: array_fill() [function.array-fill]: Number of elements must be positive in /Applications/MAMP/htdocs/porting-5x/sites/all/modules/upload_perm_per_type/upload_perm_per_type.module on line 50.
* warning: array_fill() [function.array-fill]: Number of elements must be positive in /Applications/MAMP/htdocs/porting-5x/sites/all/modules/upload_perm_per_type/upload_perm_per_type.module on line 50.
#1
Oops. I mistook the cause of the error.
#2
If this remains a problem for anyone in the 6.x branch then please re-open the issue there. Thanks!
#3
Marking as closed
#4
This remains an issue for version 6, except it is only if no roles, unlike the description it ONLY happens if no roles have upload permissions
warning: array_fill() [function.array-fill]: Number of elements must be positive in (...)upload_perm_per_type/upload_perm_per_type.module on line 48.
I have made a dirty hack to stop the errors from showing, but wonder if there could be a cleaner way
#5
Thanks. You're on the right track but I think we can do it a little cleaner. I'll see if I can get a patch worked up and committed this afternoon.
#6
Hmm.. I was trying to recreate this and I didn't get this error. Do you get it when viewing the page? or when submitting it?
#7
when viewing. Usually it is when I have started a site from scratch and have not gotten around to adding upload permissions to any roles. I didnt test with the built in content types but I do notice it with cck content types
#8
I have the same problem. Since I don know how to apply thr diff file i still not ablle to test the solution on drupal 6.
Once I create a role with permission to upload file the error went away...