<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<big><big><big>One thing I recently noticed with my themes that have
widgets is that I get some undefined index/variable notices
when using the_widget() function to output a widget created by
my theme. This wouldn't show up unless someone actually used
the_widget() function. Using it as a regular widget in a
dynamic sidebar is fine because the variables always get set
on widget save.<br>
<br>
This issue arises when you're building a widget with options.
Typically, you'd grab these options from the $instance
parameter for the widget() method. When calling the_widget(
'My_Widget_Class' ); in my theme, WP_DEBUG goes crazy. The
problem is simply that there's no checks if
$instance['some_option'] has been set.<br>
<br>
I'm going through all my widgets right now to update them for
this use case. I don't think it's overly important because
it's a pretty rare scenario and definitely one you wouldn't
notice in a typical review, but I thought I'd post it here for
you all.</big></big></big>
</body>
</html>