dev/core#117 Replace deprecated each with foreach in CRM/Utils/Token.php
authorSeamus Lee <seamuslee001@gmail.com>
Sat, 19 May 2018 04:15:10 +0000 (14:15 +1000)
committerSeamus Lee <seamuslee001@gmail.com>
Sat, 19 May 2018 10:18:58 +0000 (20:18 +1000)
CRM/Utils/Token.php

index 44a649885882a2453150f85d1eafa832aa062228..d879d6f697bb4aebaae1243eda95cae331773538 100644 (file)
@@ -1404,8 +1404,8 @@ class CRM_Utils_Token {
         $greetingTokens = $remainingTokens;
         reset($greetingTokens);
         $greetingsReturnProperties = array();
-        while (list($key) = each($greetingTokens)) {
-          $props = array_flip(CRM_Utils_Array::value($key, $greetingTokens));
+        foreach ($greetingTokens as $value) {
+          $props = array_flip($value);
           $props = array_fill_keys(array_keys($props), 1);
           $greetingsReturnProperties = $greetingsReturnProperties + $props;
         }