Unverified Commit 734d08b4 authored by Dave Reid's avatar Dave Reid Committed by Dave Reid

Issue #2930268 by VitalyM, Dave Reid, eyilmaz: Context hash implemenation not...

Issue #2930268 by VitalyM, Dave Reid, eyilmaz: Context hash implemenation not reliable when using more than 1 context
parent c952b919
...@@ -435,7 +435,7 @@ function xmlsitemap_sitemap_get_max_filesize(XmlSitemapInterface $sitemap) { ...@@ -435,7 +435,7 @@ function xmlsitemap_sitemap_get_max_filesize(XmlSitemapInterface $sitemap) {
* Hash string for the context. * Hash string for the context.
*/ */
function xmlsitemap_sitemap_get_context_hash(array &$context) { function xmlsitemap_sitemap_get_context_hash(array &$context) {
asort($context); ksort($context);
return Crypt::hashBase64(serialize($context)); return Crypt::hashBase64(serialize($context));
} }
...@@ -1414,7 +1414,7 @@ function xmlsitemap_get_current_context() { ...@@ -1414,7 +1414,7 @@ function xmlsitemap_get_current_context() {
if (!isset($context)) { if (!isset($context)) {
$context = \Drupal::moduleHandler()->invokeAll('xmlsitemap_context'); $context = \Drupal::moduleHandler()->invokeAll('xmlsitemap_context');
\Drupal::moduleHandler()->alter('xmlsitemap_context', $context); \Drupal::moduleHandler()->alter('xmlsitemap_context', $context);
asort($context); ksort($context);
} }
return $context; return $context;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment