From 7135886cc580e4c26efcd3b45a103df69ff24496 Mon Sep 17 00:00:00 2001 From: edwardaa Date: Tue, 22 Dec 2015 06:45:27 +0100 Subject: [PATCH] [BUGFIX] Avoid cache poisoning with colliding cache keys Replace drupal_static(__FUNCTION__) with drupal_static(__METHOD__) --- src/Formatter/FormatterManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Formatter/FormatterManager.php b/src/Formatter/FormatterManager.php index 9cfda2a7..f59dbfae 100644 --- a/src/Formatter/FormatterManager.php +++ b/src/Formatter/FormatterManager.php @@ -173,7 +173,7 @@ protected function processData($method, array $data, $formatter_name = NULL) { * @see drupal_match_path(). */ protected static function matchContentType($content_type, $pattern) { - $regexps = &drupal_static(__FUNCTION__); + $regexps = &drupal_static(__METHOD__); if (!isset($regexps[$pattern])) { // Convert path settings to a regular expression.