title: Fatal error: Allowed memory size of 134217728 bytes exhausted - Drupal
body: <p>After doing Drupal updates, I am getting this error - I believe the previous developer (stupidly) edited core:</p>
  
  <pre><code>Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 74 bytes) in /home/readyby2/public_html/includes/common.inc on line 1408
  </code></pre>
  
  <p>I believe it has something to do with updating the views module. It occurs on Admin >> People >> Profiles</p>
  
  <p>Any leads you can all give me?</p>
  
  <p>I'm checking my common.inc, and here's line 1408 and surrounding:</p>
  
  <pre><code>function _filter_xss_split($m, $store = FALSE) {
    static $allowed_html;
  
    if ($store) {
      $allowed_html = array_flip($m);
      return;
    }
  </code></pre>
  
  <p>The offending line appears to be <code>$allowed_html = array_flip($m);</code></p>
  
  <p>Here's the full function:</p>
  
  <pre><code>function _filter_xss_split($m, $store = FALSE) {
    static $allowed_html;
  
    if ($store) {
      $allowed_html = array_flip($m);
      return;
    }
  
    $string = $m[1];
  
    if (substr($string, 0, 1) != '&lt;') {
      // We matched a lone "&gt;" character.
      return '&amp;gt;';
    }
    elseif (strlen($string) == 1) {
      // We matched a lone "&lt;" character.
      return '&amp;lt;';
    }
  
    if (!preg_match('%^&lt;\s*(/\s*)?([a-zA-Z0-9]+)([^&gt;]*)&gt;?|(&lt;!--.*?--&gt;)$%', $string, $matches)) {
      // Seriously malformed.
      return '';
    }
  
    $slash = trim($matches[1]);
    $elem = &amp;$matches[2];
    $attrlist = &amp;$matches[3];
    $comment = &amp;$matches[4];
  
    if ($comment) {
      $elem = '!--';
    }
  
    if (!isset($allowed_html[strtolower($elem)])) {
      // Disallowed HTML element.
      return '';
    }
  
    if ($comment) {
      return $comment;
    }
  
    if ($slash != '') {
      return "&lt;/$elem&gt;";
    }
  
    // Is there a closing XHTML slash at the end of the attributes?
    $attrlist = preg_replace('%(\s?)/\s*$%', '\1', $attrlist, -1, $count);
    $xhtml_slash = $count ? ' /' : '';
  
    // Clean up attributes.
    $attr2 = implode(' ', _filter_xss_attributes($attrlist));
    $attr2 = preg_replace('/[&lt;&gt;]/', '', $attr2);
    $attr2 = strlen($attr2) ? ' ' . $attr2 : '';
  
    return "&lt;$elem$attr2$xhtml_slash&gt;";
  }
  </code></pre>