Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. JsonParser.php

function JsonParser::failOnBOM

Parameters

string $input:

Return value

void

1 call to JsonParser::failOnBOM()
JsonParser::parse in vendor/seld/jsonlint/src/Seld/JsonLint/JsonParser.php
@phpstan-param int-mask-of<self::*> $flags

File

vendor/seld/jsonlint/src/Seld/JsonLint/JsonParser.php, line 599

Class

JsonParser
Parser class

Namespace

Seld\JsonLint

Code

private function failOnBOM($input) {
    // UTF-8 ByteOrderMark sequence
    $bom = "";
    if (substr($input, 0, 3) === $bom) {
        $this->parseError("BOM detected, make sure your input does not include a Unicode Byte-Order-Mark");
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal