Update to remove each() calls
authorSteve Sutton <steve@gaslightmedia.com>
Tue, 12 Feb 2019 17:53:45 +0000 (12:53 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Tue, 12 Feb 2019 17:53:45 +0000 (12:53 -0500)
Deprecated

classes/data/dataReferredBy.php

index d50adc1..a596c71 100644 (file)
@@ -183,7 +183,7 @@ class GlmDataReferredBy extends GlmDataAbstract
         $categoriesSorted = $this->sortParentChild($categories);
 
         if (!$forEdit) {
-            while (list($k, $v) = each($categoriesSorted)) {
+            foreach ( $categoriesSorted as $k => $v ) {
                 $categoriesSorted[$k]['parent_id'] = $v['parent']['value'];
                 $categoriesSorted[$k]['parent'] = $v['parent']['name'];
             }