After untarring and enabling the pathfilter module, I impatiently tried to edit a node without enabling the input filter. I got the following errors (2 times):
warning: in_array() [function.in-array]: Wrong datatype for second argument in /var/www/vhosts/SITEURL/httpdocs/sites/all/modules/pathfilter/pathfilter.module on line 228.
As a feature request, I was wondering if it would be helpful for impatient people like me to have a check that if the query on line 218 of pathfilter.module returns an empty set, then the system assumes that the user has not completed the set-up and warns them: "You must enable PathFilter for any input formats you wish and Path Filter must run before Drupal's HTML filter."
I'm just getting started with D6 so I can't submit a patch just yet. Maybe in a week when I get more familiar with this?
Thanks for your work on this module.
Comments
Comment #1
wongo888 commentedI noticed that in the 6.x-2.0-DEV tarball, an empty array was declared on 228 in pathfilter.module which removed the error messages I reported; however, I went ahead an made a warning message anyway. This patch raises a warning if no filters were found and returns without doing the fornext loops.
I'm not sure if that's the user experience that is wanted or not, but here it is if you want it.
Cheers.
Comment #2
mrfelton commentedI think that the fix that has already been committed for this is sufficient (defining $defined_formats as an empty array). I don't think a warning should be generated because no input formats are using the filter. The installation notes say that you have to turn it on, I think that's enough! Thanks though.