Loading core/lib/Drupal/Component/Diff/Engine/HWLDFWordAccumulator.php +1 −1 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ public function addWords($words, $tag = '') { $this->_flushLine($tag); $word = mb_substr($word, 1); } assert(!strstr($word, "\n")); assert(!str_contains($word, "\n")); $this->group .= $word; } } Loading core/lib/Drupal/Core/Config/Entity/Query/Condition.php +2 −2 Original line number Diff line number Diff line Loading @@ -200,13 +200,13 @@ protected function match(array $condition, $value) { return array_search($value, $condition['value']) === FALSE; case 'STARTS_WITH': return strpos($value, $condition['value']) === 0; return str_starts_with($value, $condition['value']); case 'CONTAINS': return str_contains($value, $condition['value']); case 'ENDS_WITH': return substr($value, -strlen($condition['value'])) === (string) $condition['value']; return str_ends_with($value, $condition['value']); default: throw new QueryException('Invalid condition operator.'); Loading core/lib/Drupal/Core/Config/Entity/Query/Query.php +2 −2 Original line number Diff line number Diff line Loading @@ -203,7 +203,7 @@ protected function loadRecords() { case 'STARTS_WITH': $filter = static function ($name) use ($value, $prefix_length) { $id = substr($name, $prefix_length); return strpos($id, $value) === 0; return str_starts_with($id, $value); }; break; Loading @@ -217,7 +217,7 @@ protected function loadRecords() { case 'ENDS_WITH': $filter = static function ($name) use ($value, $prefix_length) { $id = substr($name, $prefix_length); return strrpos($id, $value) === strlen($id) - strlen($value); return str_ends_with($id, $value); }; break; } Loading core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/PhpSelection.php +2 −2 Original line number Diff line number Diff line Loading @@ -116,13 +116,13 @@ protected function matchLabel($match, $match_operator, $label) { return array_search($label, $match) === FALSE; case 'STARTS_WITH': return strpos($label, $match) === 0; return str_starts_with($label, $match); case 'CONTAINS': return str_contains($label, $match); case 'ENDS_WITH': return mb_substr($label, -mb_strlen($match)) === (string) $match; return str_ends_with($label, $match); case 'IS NOT NULL': return TRUE; Loading core/lib/Drupal/Core/EventSubscriber/ActiveLinkResponseFilter.php +1 −1 Original line number Diff line number Diff line Loading @@ -146,7 +146,7 @@ public static function setLinkActiveClass($html_markup, $current_path, $is_front // attribute. // 2. We are on the front page and a link has the special '<front>' value in // its 'data-drupal-link-system-path' attribute. while (strpos($html_markup, $search_key_current_path, $offset) !== FALSE || ($is_front && strpos($html_markup, $search_key_front, $offset) !== FALSE)) { while (str_contains(substr($html_markup, $offset), $search_key_current_path) || ($is_front && str_contains(substr($html_markup, $offset), $search_key_front))) { $pos_current_path = strpos($html_markup, $search_key_current_path, $offset); // Only look for links with the special '<front>' system path if we are // actually on the front page. Loading Loading
core/lib/Drupal/Component/Diff/Engine/HWLDFWordAccumulator.php +1 −1 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ public function addWords($words, $tag = '') { $this->_flushLine($tag); $word = mb_substr($word, 1); } assert(!strstr($word, "\n")); assert(!str_contains($word, "\n")); $this->group .= $word; } } Loading
core/lib/Drupal/Core/Config/Entity/Query/Condition.php +2 −2 Original line number Diff line number Diff line Loading @@ -200,13 +200,13 @@ protected function match(array $condition, $value) { return array_search($value, $condition['value']) === FALSE; case 'STARTS_WITH': return strpos($value, $condition['value']) === 0; return str_starts_with($value, $condition['value']); case 'CONTAINS': return str_contains($value, $condition['value']); case 'ENDS_WITH': return substr($value, -strlen($condition['value'])) === (string) $condition['value']; return str_ends_with($value, $condition['value']); default: throw new QueryException('Invalid condition operator.'); Loading
core/lib/Drupal/Core/Config/Entity/Query/Query.php +2 −2 Original line number Diff line number Diff line Loading @@ -203,7 +203,7 @@ protected function loadRecords() { case 'STARTS_WITH': $filter = static function ($name) use ($value, $prefix_length) { $id = substr($name, $prefix_length); return strpos($id, $value) === 0; return str_starts_with($id, $value); }; break; Loading @@ -217,7 +217,7 @@ protected function loadRecords() { case 'ENDS_WITH': $filter = static function ($name) use ($value, $prefix_length) { $id = substr($name, $prefix_length); return strrpos($id, $value) === strlen($id) - strlen($value); return str_ends_with($id, $value); }; break; } Loading
core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/PhpSelection.php +2 −2 Original line number Diff line number Diff line Loading @@ -116,13 +116,13 @@ protected function matchLabel($match, $match_operator, $label) { return array_search($label, $match) === FALSE; case 'STARTS_WITH': return strpos($label, $match) === 0; return str_starts_with($label, $match); case 'CONTAINS': return str_contains($label, $match); case 'ENDS_WITH': return mb_substr($label, -mb_strlen($match)) === (string) $match; return str_ends_with($label, $match); case 'IS NOT NULL': return TRUE; Loading
core/lib/Drupal/Core/EventSubscriber/ActiveLinkResponseFilter.php +1 −1 Original line number Diff line number Diff line Loading @@ -146,7 +146,7 @@ public static function setLinkActiveClass($html_markup, $current_path, $is_front // attribute. // 2. We are on the front page and a link has the special '<front>' value in // its 'data-drupal-link-system-path' attribute. while (strpos($html_markup, $search_key_current_path, $offset) !== FALSE || ($is_front && strpos($html_markup, $search_key_front, $offset) !== FALSE)) { while (str_contains(substr($html_markup, $offset), $search_key_current_path) || ($is_front && str_contains(substr($html_markup, $offset), $search_key_front))) { $pos_current_path = strpos($html_markup, $search_key_current_path, $offset); // Only look for links with the special '<front>' system path if we are // actually on the front page. Loading