PDA

View Full Version : Bug with Missing Variables in Addons


dakwegmo
04-04-2007, 02:07 PM
I uploaded the flikrpost addon, which didn't include the $addon_name,
$addon_description, or $addon_version. When I checked admin -> addons, the last two addons had identical version, description, and name.

The descriptions were identical and the headings looked like this:

Advanced Pixelpost Comment Stats (admin_comment_stat - version 1.0) - status: ON


Advanced Pixelpost Comment Stats (admin_flickrpost - version 1.0) - status: ON


I'm assuming the name in parentheses is derived from the file name, and since the flikrpost addon doesn't have those variables set, the data is "inherited" from the last addon. It would probably be a good idea to either clear the variables after each addon is processed, or reinitialize them to null values before each addon.

Dennis
04-04-2007, 03:19 PM
Or addon-writers should provide this $addon_name, $addon_description, and $addon_version

We can make it so an addon who doesn't have these values cannot be used ;)

I understand what your saying and we have to find some common ground on this, somewhere between your and my solution. We should discuss this as a dev-team

dakwegmo
04-04-2007, 03:31 PM
We can make it so an addon who doesn't have these values cannot be used ;)

I know you're being facetious, but that's not an entirely bad idea. You can't help but wonder how many other details the addon writer might have overlooked. In this case the addon works fine, but that won't always be true.

Dennis
04-05-2007, 09:36 AM
Anyway, since we only fix small bugs for 1.6 this will probably be in 1.61. It requires some rewriting and there isn't enough time to test it.

But we added it to our todo list.