X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;ds=inline;f=web%2Fcore%2Flib%2FDrupal%2FCore%2FEntity%2FPlugin%2FEntityReferenceSelection%2FPhpSelection.php;fp=web%2Fcore%2Flib%2FDrupal%2FCore%2FEntity%2FPlugin%2FEntityReferenceSelection%2FPhpSelection.php;h=52cf33d29d7dac7dbb2e449e2d5193214e7b8497;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=4545ebbe866a2c51d7e2aefcb59dbf38c31edc07;hpb=74df008bdbb3a11eeea356744f39b802369bda3c;p=yaffs-website diff --git a/web/core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/PhpSelection.php b/web/core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/PhpSelection.php index 4545ebbe8..52cf33d29 100644 --- a/web/core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/PhpSelection.php +++ b/web/core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/PhpSelection.php @@ -3,7 +3,6 @@ namespace Drupal\Core\Entity\Plugin\EntityReferenceSelection; use Drupal\Component\Utility\Html; -use Drupal\Component\Utility\Unicode; /** * Defines an alternative to the default Entity Reference Selection plugin. @@ -35,11 +34,11 @@ class PhpSelection extends DefaultSelection { // possible. // @see \Drupal\Core\Entity\EntityReferenceSelection\SelectionInterface::getReferenceableEntities() if (is_string($match)) { - $match = Html::escape(Unicode::strtolower($match)); + $match = Html::escape(mb_strtolower($match)); } elseif (is_array($match)) { array_walk($match, function (&$item) { - $item = Html::escape(Unicode::strtolower($item)); + $item = Html::escape(mb_strtolower($item)); }); } @@ -89,7 +88,7 @@ class PhpSelection extends DefaultSelection { */ protected function matchLabel($match, $match_operator, $label) { // Always use a case-insensitive value. - $label = Unicode::strtolower($label); + $label = mb_strtolower($label); switch ($match_operator) { case '=': @@ -113,7 +112,7 @@ class PhpSelection extends DefaultSelection { case 'CONTAINS': return strpos($label, $match) !== FALSE; case 'ENDS_WITH': - return Unicode::substr($label, -Unicode::strlen($match)) === (string) $match; + return mb_substr($label, -mb_strlen($match)) === (string) $match; case 'IS NOT NULL': return TRUE; case 'IS NULL':