With Secure Pages enabled for specific pages only (admin pages, store pages, etc.), and "Switch back to http pages when there are no matches" checked, I get this error:

Fatal error: Cannot use object of type view as array in /mnt/local/home/webuser/example.com/modules/securepages/securepages.module on line 181

(Unchecking "switch back to http" does not seem to have an effect on this error.)

This specific instance is on the page that loads for a taxonomy term. I am not 100% sure that it is not happening elsewhere yet, but it does seem to happen on all such pages.

Help?

CommentFileSizeAuthor
#2 secure_pages_patch.diff501 bytesmikejoconnor

Comments

nodren’s picture

Priority: Normal » Critical

i had this same problem, its because views is installed, however the issue isnt because of views.

securepages had the wrong order for the hook_link_alter() it changed from drupal 5 to drupal 6

so to fix this, i changed line 176 from:

function securepages_link_alter(&$node, &$links) {

to:

function securepages_link_alter(&$links, &$node) {

that fixed the problem for me.

mikejoconnor’s picture

Title: Fatal Error for taxonomy term? » Cannot use object of type stdClass as array line 181
Status: Active » Needs review
StatusFileSize
new501 bytes

I am experiencing the same issue, without taxonomy. The fix from comment 1 worked for me, here is a patch.

Also changed the title to help others looking for this error.

gordon’s picture

Status: Needs review » Closed (duplicate)

Actually this has been already fixed in dev.