Closed (fixed)
Project:
Quotes
Version:
6.x-1.40
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Jan 2011 at 02:37 UTC
Updated:
14 Feb 2011 at 03:30 UTC
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
Comment #1
pillarsdotnet commentedComment #2
ctmattice1 commentedfixed in next dev release