Notice: Use of undefined constant FILTER_FORMAT_DEFAULT - assumed 'FILTER_FORMAT_DEFAULT' in quotes_admin_settings() (line 81 of modules/quotes/quotes.admin.inc).

Patch to fix:


--- quotes.admin.inc
+++ quotes.admin.inc
@@ -78,7 +78,7 @@ function quotes_admin_settings($form, $form_state) {
 
   global $user;
   $format_list = filter_formats($user);
-  $formats = array(FILTER_FORMAT_DEFAULT => '-node format-');
+  $formats = array(filter_fallback_format() '-node format-');
   foreach ($format_list as $number => $filter) {
     $formats[$number] = $filter->name;
   }

Comments

pillarsdotnet’s picture

StatusFileSize
new472 bytes

Grrr... Corrected patch.


--- quotes.admin.inc
+++ quotes.admin.inc
@@ -78,7 +78,7 @@ function quotes_admin_settings($form, $form_state) {
 
   global $user;
   $format_list = filter_formats($user);
-  $formats = array(FILTER_FORMAT_DEFAULT => '-node format-');
+  $formats = array(filter_fallback_format() => '-node format-');
   foreach ($format_list as $number => $filter) {
     $formats[$number] = $filter->name;
   }
pillarsdotnet’s picture

Status: Needs work » Needs review
TallDavid’s picture

Status: Needs review » Reviewed & tested by the community

Applied the patch to a Drupal 7.0-RC3 site which was experiencing the Notice. The patch has resolved the issue on this site.

Note to self: aft.c

ctmattice1’s picture

fixed in next dev release

pillarsdotnet’s picture

Status: Needs review » Fixed

fixed in CVS

Status: Fixed » Closed (fixed)

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