Hi,
I get this error when I access a view generated page:
Fatal error: Cannot use object of type view as array in
/sites/all/modules/securepages/securepages.module on line 134
Even when I switch back to non-secure http.
thanks :-)
Bo
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | securepage_link_alter_def_fix.patch | 634 bytes | pasc |
| #6 | securepages.module.patch | 577 bytes | jhedstrom |
Comments
Comment #1
rismondo commentedI found the same bug today; some code inspection revealed the following:
in securepages.module, in the function:
the test should really be:
This fixes the bug on my version (6.x) of securepages.
Comment #2
sciman commentedI wonder if this is not related to the issue I just reported
http://drupal.org/node/285999
The fix there was this:
change
if ($link['href']) {
to
if ($link->href) {
Comment #3
fletchgqc commentedSame bug experienced.
Comment #4
pariviere commentedThis fix works for me
Comment #5
fletchgqc commentedWorks for me too. Please commit, maintainer-man.
By the way I'm going to hijack this issue to mention that there's an error with the "installation successful" text on installation - the happy green text refers to !setting which I guess is supposed to be !settings or something that will get dynamically replaced.
Comment #6
jhedstromInstead of simply checking for $link being an array, the attached patch casts $link to an array so as not to lose out on the behavior for modules that pass $link as an object.
Comment #7
grendzy commentedThe patch in #6 worked for me.
Thanks!
Comment #8
jhedstromIs there any reason not to apply this patch? It's a trivial fix to a fatal error...
Comment #9
sreese commentedThe patch in #6 fixed an issue for me in the 5.x version as well. Views urls were not being handled properly but upon applying the patch, all is well again. Please commit for the 5.x version too!
Comment #10
pasc commentedI just had the same issue as well, but I disagree with the patches posted above. The function definition for the link_alter hook is wrong in the securepages module and doesn't match
http://api.drupal.org/api/function/hook_link_alter
I've attached a patch that sets it right.
Changing that definition fixed the problems for me.
Comment #11
pasc commentedChanged title
I've also marked as the duplicates the following:
#301265: hook_link_alter is broken in Drupal 6 (contains slightly different patch)
#301008: Compatibility with Node Vote
Comment #12
triclops commentedSubscribing
Comment #13
Markpanzee commentedI was experiencing the same problem. The patch in #10 seems to have fixed this problem for me.
Comment #14
gordon commentedThanks this has been committed.
Comment #15
j0rd commentedThis bug still exists in DRUPAL-6--1-7-BETA1 . Problem is with hook_link_alter definition as mentioned above.
^-- is the fix. Simple. I hope this simple fix to a fatal error gets resolved, committed and a new version is sent out to the public.