commit f9d4b8986befa7f9d3929b23029ccb90ddaee362
Author: Assos Assos <assos+forge@centrale-marseille.fr>
Date:   Wed Mar 3 23:11:46 2021 +0100

    Weekly update of contrib modules

diff --git a/drupal7/sites/all/modules/token/tests/token_test.info b/drupal7/sites/all/modules/token/tests/token_test.info
index 02d93794..01926af1 100644
--- a/drupal7/sites/all/modules/token/tests/token_test.info
+++ b/drupal7/sites/all/modules/token/tests/token_test.info
@@ -5,9 +5,8 @@ core = 7.x
 files[] = token_test.module
 hidden = TRUE
 
-; Information added by Drupal.org packaging script on 2017-01-25
-version = "7.x-1.7"
+; Information added by Drupal.org packaging script on 2021-03-02
+version = "7.x-1.8"
 core = "7.x"
 project = "token"
-datestamp = "1485316088"
-
+datestamp = "1614719852"
diff --git a/drupal7/sites/all/modules/token/token.info b/drupal7/sites/all/modules/token/token.info
index afa8c62e..a6176b02 100644
--- a/drupal7/sites/all/modules/token/token.info
+++ b/drupal7/sites/all/modules/token/token.info
@@ -1,11 +1,11 @@
 name = Token
 description = Provides a user interface for the Token API and some missing core tokens.
 core = 7.x
+dependencies[] = system (>=7.23)
 files[] = token.test
 
-; Information added by Drupal.org packaging script on 2017-01-25
-version = "7.x-1.7"
+; Information added by Drupal.org packaging script on 2021-03-02
+version = "7.x-1.8"
 core = "7.x"
 project = "token"
-datestamp = "1485316088"
-
+datestamp = "1614719852"
diff --git a/drupal7/sites/all/modules/token/token.module b/drupal7/sites/all/modules/token/token.module
index bbca2aab..6d8babea 100644
--- a/drupal7/sites/all/modules/token/token.module
+++ b/drupal7/sites/all/modules/token/token.module
@@ -161,6 +161,8 @@ function token_theme() {
       'attributes' => array(),
       'empty' => '',
       'caption' => '',
+      'colgroups' => array(),
+      'sticky' => TRUE,
     ),
     'file' => 'token.pages.inc',
   );
@@ -1228,7 +1230,7 @@ function token_menu_link_load_all_parents($mlid) {
   if (!isset($cache[$mlid])) {
     $cache[$mlid] = array();
     $plid = db_query("SELECT plid FROM {menu_links} WHERE mlid = :mlid", array(':mlid' => $mlid))->fetchField();
-    while ($plid && $parent = token_menu_link_load($plid)) {
+    while ($plid && $plid != $mlid && $parent = token_menu_link_load($plid)) {
       $cache[$mlid] = array($plid => $parent['title']) + $cache[$mlid];
       $plid = $parent['plid'];
     }
diff --git a/drupal7/sites/all/modules/token/token.test b/drupal7/sites/all/modules/token/token.test
index cd09e15b..15c406b9 100644
--- a/drupal7/sites/all/modules/token/token.test
+++ b/drupal7/sites/all/modules/token/token.test
@@ -956,6 +956,7 @@ class TokenArrayTestCase extends TokenTestHelper {
       'last' => 'b',
       'value:0' => 'a',
       'value:2' => 'c',
+      'value:#property' => NULL,
       'count' => 4,
       'keys' => '2, 0, 4, 1',
       'keys:value:3' => '1',
@@ -1080,7 +1081,7 @@ class TokenBlockTestCase extends TokenTestHelper {
     $edit['body[value]'] = 'This is the test token title block.';
     $this->drupalPost('admin/structure/block/add', $edit, 'Save block');
     // Ensure token validation is working on the block.
-    $this->assertText('The Block title is using the following invalid tokens: [user:name].');
+    $this->assertText('Block title is using the following invalid tokens: [user:name].');
 
     // Create the block for real now with a valid title.
     $edit['title'] = '[current-page:title] block title';
diff --git a/drupal7/sites/all/modules/token/token.tokens.inc b/drupal7/sites/all/modules/token/token.tokens.inc
index f584bdaf..3d65d6ee 100644
--- a/drupal7/sites/all/modules/token/token.tokens.inc
+++ b/drupal7/sites/all/modules/token/token.tokens.inc
@@ -848,7 +848,7 @@ function token_tokens($type, $tokens, array $data = array(), array $options = ar
     // [array:value:*] dynamic tokens.
     if ($value_tokens = token_find_with_prefix($tokens, 'value')) {
       foreach ($value_tokens as $key => $original) {
-        if ($key[0] !== '#' && isset($array[$key])) {
+        if (array_key_exists($key, $array) && in_array($key, $keys)) {
           $replacements[$original] = token_render_array_value($array[$key], $options);
         }
       }
