{"record":{"id":"7f885c879bd54847","repo":"phalcon/cphalcon","slug":"invalid-claims-not-an-array","errorCode":null,"errorMessage":"Invalid Claims (not an array)","messagePattern":"Invalid Claims \\(not an array\\)","errorType":"exception","errorClass":"InvalidClaims","httpStatus":null,"severity":"error","filePath":"phalcon/Encryption/Security/JWT/Token/Parser.zep","lineNumber":86,"sourceCode":"\n        return new Token(headers, claims, signature);\n    }\n\n    /**\n     * Decode the claims\n     *\n     * @param string $claims\n     *\n     * @return Item\n     */\n    private function decodeClaims(string claims) -> <Item>\n    {\n        var decoded;\n\n        let decoded = this->decode->__invoke(this->doDecodeUrl(claims), true);\n\n        if typeof decoded !== \"array\" {\n            throw new InvalidClaims();\n        }\n\n        /**\n         * Just in case\n         */\n        if isset decoded[Enum::AUDIENCE] && typeof decoded[Enum::AUDIENCE] !== \"array\" {\n            let decoded[Enum::AUDIENCE] = [decoded[Enum::AUDIENCE]];\n        }\n\n        return new Item(decoded, claims);\n    }\n\n    /**\n     * Decodes the headers\n     *\n     * @param string $headers\n     *\n     * @return Item","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/phalcon/cphalcon/blob/b7419de9cd0a8a3f48441ead84c9f8415d463e25/phalcon/Encryption/Security/JWT/Token/Parser.zep#L68-L104","documentation":"Error \"Invalid Claims (not an array)\" thrown in phalcon/cphalcon.","triggerScenarios":"Thrown at phalcon/Encryption/Security/JWT/Token/Parser.zep:86 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b7419de9cd0a8a3f48441ead84c9f8415d463e25","analyzedAt":"2026-08-21T06:21:18.811Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}