Skip to content

Commit

Permalink
[BUGFIX] Avoid cache poisoning with colliding cache keys
Browse files Browse the repository at this point in the history
Replace drupal_static(__FUNCTION__) with drupal_static(__METHOD__)
  • Loading branch information
xuxucode authored and Mateu Aguiló Bosch committed Dec 22, 2015
1 parent cbcaa48 commit 7135886
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Formatter/FormatterManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 7135886

Please sign in to comment.