Our host just recently updated to PHP Version 5.3.4 and with it came a boat load of php errors. one of which included me having to edit the php settings to add the north american/ newyork time zone to avoid getting copious amounts of timestamp errors. along with these errors all websites that we've done anything with "Secure Pages" is throwing up 4 of these errors.

warning: Parameter 2 to securepages_link_alter() expected to be a reference, value given in /home/hopereso/public_html/includes/common.inc on line 2883.

Hopereso being the account the site is on. All sites have this exact same error (minus the homepage name in the address of the error)

It doesn't seem to effect the workings of the module but the error messages are annoying! Short of just display:none on the .error class i don't know what to do to solve this. comments? Thanks in advance.

Comments

travisimo’s picture

No one can help me on this?

freelock’s picture

Status: Active » Needs work
Issue tags: +PHP 5.3 compatibility

Edit the function header it's complaining about, by removing the & in front of $node:

@@ -122,7 +122,7 @@ function securepages_form_alter(&$form, &$form_state, $form_id) {
/**
* Implementation of hook_link_alter().
*/
-function securepages_link_alter(&$links, &$node) {
+function securepages_link_alter(&$links, $node) {
if (!variable_get('securepages_enable', 0)) {
return;
}

Because this function does not change the $node variable, it's not necessary for it to be passed by reference. Note: you must leave the & in front of $links, or this will break...

jdexo’s picture

@freelock
Thank you for a tip!

travisimo’s picture

thanks for the post sorry i was late getting back to this. it did solve the issue for now.

grendzy’s picture

Status: Needs work » Closed (duplicate)

This is fixed in dev and will be in 1.9 when it comes out.

#786300: Warning for securepages_link_alter() function