1. On enabling the module, the modules page displays the error message:
warning: Invalid argument supplied for foreach() in /home/752/knowhow/www.knowledge.co.uk/public_html/sites/all/modules/views/views.module on line 80.
After refreshing the modules page, the message disappears.
2. On visiting an existing view, I get another warning message:
warning: Invalid argument supplied for foreach() in /home/752/knowhow/www.knowledge.co.uk/public_html/sites/all/modules/views/includes/admin.inc on line 1060.
Refreshing the Views page, and clearing the Views cache, does not remove the message.
Comments
Comment #1
CobraMP commentedI am seeing this as well and
can't choose php as an access option
Comment #2
Chemtox commentedJust installed the module to try it out, and decided to have a quick go at the warnings. It was easy to spot after a bit of debugging in views.module: there's an alien 'info' item in views_php_views_plugins() (the dangers of copy-paste! ;). Removing it fixed the warnings.
To trigger the first warning, clear the Theme registry cache; for the second, reload an Edit view page.
Ok, now to finally try the module!
Comment #3
giorgoskwarnings are gone with patch
Comment #4
giorgoskeven though it clears the warning
it seems that you are throwing away perfectly good code
marked as needs work
Comment #5
Chemtox commentedIt is perfectly good code... in hook_views_handlers(), from where it was probably copy-pasted by mistake. If you care to look at the docs (/help/views/api-plugins), you'll see that there's no "info" plugin type, and that even if there where one, a "path" identifier plus the module directory it's still not a proper plugin definition. But I'll let someone else confirm that.
Comment #6
giorgio79 commentedLooks good to me, thanks Chemtox for the patch and also GiorgiosK for being the first reviewer
Comment #7
iantresman commentedMy thanks too, 24-hours from problem to resolution ain't bad!
Comment #8
Chemtox commentedIf only more problems could be solved with just backspace! ;)
Comment #9
infojunkieCommitted to latest dev. Thanks everyone!