I keep getting this error all around the site after I've installed the module: "Notice: Trying to get property of non-object in google_authorship_preprocess_username()"

Specifically it refers to this bit of the code in the .module file:

 // Checks that authorship information should be added for the node content type
  if (!empty($bundles) && !in_array($node->type, $bundles)) {
    return;
  }

It could be an issue with later versions of PHP (5.4 & 5.5) as these issues seem to pop up. I'm going to look into it more and see if I can find a fix. If someone beats me to it though, that would be rad.

Comments

gabesullice’s picture

Hi Sprice,

Sorry about that! Thanks for reporting the bug report so quickly. I only released this version a couple days ago. The patch attached should fix your issue. I'll be applying it to the latest release too, so if it works, you can just update the module and not worry about the patch. If you wouldn't mind testing and letting me know if it works for you as soon as you can, I would really appreciate it. Thanks again!

Kindly,

Gabe

gabesullice’s picture

Status: Active » Needs review
sprice’s picture

Status: Needs review » Closed (fixed)

The messages don't seem to be popping up at all for me anymore. So... I think it's fixed, and I'm marking it as such. Thanks for the quick reply and quick fix.

gabesullice’s picture

Status: Closed (fixed) » Fixed

Glad it worked for you. Thanks for reporting back!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.