Closed (fixed)
Project:
Pingback
Version:
6.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Jun 2008 at 16:21 UTC
Updated:
28 Aug 2008 at 10:23 UTC
Jump to comment: Most recent file
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.".
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 275327_fixing_undefineds-3.patch | 1.37 KB | Freso |
| #2 | 275327_fixing_undefineds-2.patch | 1.08 KB | Freso |
Comments
Comment #1
andreashaugstrup commentedSome code from the previous maintainer seem to not be safe from notice-level warnings. I'll get on this eventually. :o)
Comment #2
Freso commentedThe first one was apparently because it was checking for
$get->error, but theerrorkey is only defined if there actually is an error. Usingempty($get->error)instead of!$get->errorshould fix this. Alternatively,!isset($get->error)could be use, to avoid cases where$get->erroris0,'',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 ;)).Comment #3
Freso commentedAnd here's another fix for something yielding "undefined" errors.
Comment #4
Freso commentedCommitted to HEAD and 6.x-1.x.
Comment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.