Skip to content

Commit 8ee1a98

Browse files
tassospaul-m
tassos
authored andcommitted
Issue #2628916 by tassos, vaibhavjain: Block example does not use multibyte string functions
1 parent c635d82 commit 8ee1a98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

block_example/block_example.module

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ use Drupal\Core\Block\BlockPluginInterface;
4242
function block_example_block_view_alter(array &$build, BlockPluginInterface $block) {
4343
// We'll search for the string 'uppercase'.
4444
$definition = $block->getPluginDefinition();
45-
if ((!empty($build['#configuration']['label']) && stristr($build['#configuration']['label'], 'uppercase')) || (!empty($definition['subject']) && stristr($definition['subject'], 'uppercase'))) {
45+
if ((!empty($build['#configuration']['label']) && Unicode::strpos($build['#configuration']['label'], 'uppercase')) || (!empty($definition['subject']) && Unicode::strpos($definition['subject'], 'uppercase'))) {
4646
// This will uppercase the block title.
4747
$build['#configuration']['label'] = Unicode::strtoupper($build['#configuration']['label']);
4848
}

0 commit comments

Comments
 (0)