I just tried to trigger a Pingback against my own site, but nothing happened. So I checked the logs and noticed a lot of "Undefined property: stdClass::$error in /home/www/freso.dk/sites/all/modules/pingback/pingback.module on line 345." and a few "Undefined variable: successful in /home/www/freso.dk/sites/all/modules/pingback/pingback.module on line 438.".

Comments

andreashaugstrup’s picture

Some code from the previous maintainer seem to not be safe from notice-level warnings. I'll get on this eventually. :o)

Freso’s picture

Status: Active » Needs review
StatusFileSize
new1.08 KB

The first one was apparently because it was checking for $get->error, but the error key is only defined if there actually is an error. Using empty($get->error) instead of !$get->error should fix this. Alternatively, !isset($get->error) could be use, to avoid cases where $get->error is 0, '', array(), '0', or other "empty" things.

The second was due to a count($successful) where the variable was actually called $succesful. I renamed the variable, as "successful" is proper English and "succesful" is not (even if it is more proper Danish ;)).

Freso’s picture

StatusFileSize
new1.37 KB

And here's another fix for something yielding "undefined" errors.

Freso’s picture

Status: Needs review » Fixed

Committed to HEAD and 6.x-1.x.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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