The second warning notice I have received this weekend regarding the quotes module is:

notice: Undefined variable: type in quotes_form() (line 1678 of /home/toomreco/drupal-6.20/sites/all/modules/quotes/quotes.module).

I cannot see where the $type object has been set in this quotes_form() subroutine. Apparently, the problem has silently been there for quite a while going unnoticed until I went to a higher level of error reporting. The way I rectified my local copy was to add the following code around line 1678:

  $body_label = '' ;
  if (isset($type->body_label)) {
    $body_label = $type->body_label;
  }
  $min_word_count = 0;
  if (isset($type->min_word_count)) {
    $min_word_count = $type->min_word_count;
  }
  $form['body_field'] = node_body_field($node, $body_label, $min_word_count);
//  $form['body_field'] = node_body_field($node, $type->body_label, $type->min_word_count);

Again, this ideally should be incorporated into the dev code version of the module for elimination of future error notices.

Cheers!!

Comments

pillarsdotnet’s picture

ctmattice1’s picture

Status: Active » Fixed

fixed in next dev release

Status: Fixed » Closed (fixed)

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