Closed (fixed)
Project:
Notify by Views
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Oct 2008 at 15:02 UTC
Updated:
12 May 2009 at 18:40 UTC
After new content is created which triggers an immediate notification, the follow warning appears multiple times:
warning: in_array() [function.in-array]: Wrong datatype for second argument in /srv/www/vhosts/lis.luther.edu/htdocs/modules/notify_by_views/notify_by_views.module on line 345.
On my system, it appears 20 times -- equal to the number of views which are not enabled in Notify by Views.
Comments
Comment #1
matt2000 commentedI wasn't able to replicate directly, but I think I see what's happening. I've just committed a fix. Please give it a try.
Thanks for sticking with this; I haven't had as much time as I hoped with this module, but your testing and reports are a big help.
Comment #2
gjerdery commentedAfter applying the patch, I saw the same results as before. However... I changed this:
to this:
(lines 223-224) and the warning goes away! I don't think this will introduce other unusual behavior.
Comment #3
matt2000 commentedBoth are rough hacks.
I checked the key because I noticed that having no views selected could introduce an element with key = 0, value=1.
I know theres a smarter way to do this; I just haven't had time to think it through yet.
Comment #4
gjerdery commentedTo address the case you mention above, would (!$key || !$view_name) be the correct test?
Comment #5
matt2000 commentedYes, although, I still think there a more elegant way to do it.
Comment #6
ron collins commentedthat worked for me, thanks.
Comment #7
matt2000 commentedUsing the OR check for now, as it does the job.