diff --git a/caption_filter.module b/caption_filter.module
index 2ca7d0d..55fe9d4 100644
--- a/caption_filter.module
+++ b/caption_filter.module
@@ -88,6 +88,8 @@ function _caption_filter_replace($matches) {
  * Determine the width of the img/object that is being captioned.
  */
 function _caption_filter_get_width($item) {
+  $width = NULL;
+
   // Find an img or object tag within the [caption] to determine the width.
   if (preg_match_all('/<(img|object)[^>]+>/i', $item, $internal_result)) {
     foreach($internal_result['0'] as $tag) {
