drupflare/worker - v1.0.0
    Preparing search index...

    Function serializedInt

    • Reads one integer out of a PHP-serialized array, without unserializing it.

      Deliberately NOT a general unserializer. Drupal stores config as serialize($array) and the only value read here is dblog.settings row_limit, so the whole job is finding s:9:"row_limit";i:<n>;. The length prefix and the requirement that the match follow a ;, { or } are what stop a key name appearing inside some other key's string VALUE from matching -- a string value that itself contains the exact serialized bytes could still fool it, which is why every caller has a fallback and an env override.

      Parameters

      • blob: unknown

        the serialized array

      • key: string

        top-level key to read

      Returns number | null

      the integer, or null if it is absent or not an integer