Skip to content

Commit

Permalink
fix(graphql-printer): substr() => mb_substr().
Browse files Browse the repository at this point in the history
  • Loading branch information
LastDragon-ru committed May 1, 2024
1 parent b054625 commit c64a81f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/graphql-printer/src/Printer.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
use Override;

use function array_pop;
use function mb_substr;
use function str_starts_with;
use function substr;

class Printer implements PrinterContract {
private ?DirectiveResolver $directiveResolver;
Expand Down Expand Up @@ -209,7 +209,7 @@ protected function process(

if (str_starts_with($name, '@')) {
if ($directives) {
$directive = $context->getDirective(substr($name, 1));
$directive = $context->getDirective(mb_substr($name, 1));

if ($directive) {
$block = $this->getBlock($context, $directive);
Expand Down

0 comments on commit c64a81f

Please sign in to comment.