Notice: Undefined index: HTTPS in /foo/bar/sites/all/modules/contrib/addthis/addthis.module on line 179

I highly recommend coding with PHP notices on. I find that I find more bugs faster.

Comments

Renee S’s picture

This can be fixed by if (!empty($_SERVER['HTTPS'])) { instead of if ($_SERVER['HTTPS']) {

:)

swentel’s picture

Status: Active » Needs review
StatusFileSize
new1.74 KB

Or with an isset, it also happens on line 186

AlexisWilke’s picture

Assigned: Unassigned » AlexisWilke
StatusFileSize
new0 bytes

Guys there are 3 of those HTTPS tests... 8-)

Also, we are missing one in the MS-Windows special case.

There is a better patch.

Thank you.
Alexis Wilke

swentel’s picture

@AlexisWilke patch is empty

AlexisWilke’s picture

StatusFileSize
new2.82 KB

Weird... trying again. Maybe I need to rename the file...

Okay, it looks like it worked!

dave reid’s picture

Status: Needs review » Closed (duplicate)

Duplicate of #654180: php notices.

xtfer’s picture

Status: Closed (duplicate) » Needs review
StatusFileSize
new2.99 KB

Edit: Ignore this... rolled against the wrong release.

I couldn't get the patch from #5 to apply cleanly to 6.x-2.9, so I recreated it.

xtfer’s picture

Status: Needs review » Closed (duplicate)

Closing again. This issue is fixed in 6.x-3.x apparently.

ultimike’s picture

StatusFileSize
new3.1 KB

In case anyone needs it, attached is a patch very similar to #7 above, but rolled against 6.x-2.10.

-mike