Index: modules/filter/filter.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.module,v
retrieving revision 1.300
diff -u -p -r1.300 filter.module
--- modules/filter/filter.module	23 Oct 2009 22:24:14 -0000	1.300
+++ modules/filter/filter.module	28 Oct 2009 06:32:32 -0000
@@ -496,7 +496,7 @@ function _filter_list_cmp($a, $b) {
  * Check if text in a certain text format is allowed to be cached.
  */
 function filter_format_allowcache($format_id) {
-  static $cache = array();
+  $cache = &drupal_static(__FUNCTION__, array());
   if (!isset($cache[$format_id])) {
     $cache[$format_id] = db_query('SELECT cache FROM {filter_format} WHERE format = :format', array(':format' => $format_id))->fetchField();
   }
@@ -1069,7 +1069,7 @@ function _filter_url_parse_partial_links
  * Shortens long URLs to http://www.example.com/long/url...
  */
 function _filter_url_trim($text, $length = NULL) {
-  static $_length;
+  $_length = &drupal_static(__FUNCTION__);
   if ($length !== NULL) {
     $_length = $length;
   }
