Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / link / src / Plugin / Field / FieldType / LinkItem.php
index e354f00871c40230743af57cba4e572e656f789c..5d772a98ceedb1d9e1109cee4e706c643513de5f 100644 (file)
@@ -135,7 +135,7 @@ class LinkItem extends FieldItemBase implements LinkItemInterface {
           $values['title'] = mt_rand(0, 1) ? $random->sentences(4) : '';
           break;
       }
-      $values['uri'] = 'http://www.' . $random->word($domain_length) . '.' . $tlds[mt_rand(0, (sizeof($tlds) - 1))];
+      $values['uri'] = 'http://www.' . $random->word($domain_length) . '.' . $tlds[mt_rand(0, (count($tlds) - 1))];
     }
     else {
       $values['uri'] = 'base:' . $random->name(mt_rand(1, 64));