{"record":{"id":"482696fed5db033e","repo":"phalcon/cphalcon","slug":"parameters-passed-must-be-of-type-array-string-n","errorCode":null,"errorMessage":"Parameters passed must be of type array, string, numeric or null in '{className}'","messagePattern":"Parameters passed must be of type array, string, numeric or null in '(.+?)'","errorType":"exception","errorClass":"Phalcon\\Mvc\\Model\\Exceptions\\InvalidFindParameters","httpStatus":null,"severity":"error","filePath":"phalcon/Mvc/Model.zep","lineNumber":1997,"sourceCode":"     *         'key' => 'my-find-key'\n     *     ],\n     *     'hydration' => null\n     * ]\n     *\n     * @return T|\\Phalcon\\Mvc\\Model\\Row|null\n     */\n    public static function findFirst(var parameters = null) -> var | null\n    {\n        var params, query;\n\n        if null === parameters {\n            let params = [];\n        } elseif typeof parameters === \"array\" {\n            let params = parameters;\n        } elseif typeof parameters === \"string\" || is_numeric(parameters) {\n            let params = [parameters];\n        } else {\n            throw new InvalidFindParameters(get_called_class());\n        }\n\n        let query = self::getPreparedQuery(params, 1);\n\n        /**\n         * Return only the first row\n         */\n        query->setUniqueRow(true);\n\n        /**\n         * Execute the query passing the bind-params and casting-types\n         */\n        return query->execute();\n    }\n\n    /**\n     * Fires an event, implicitly calls behaviors and listeners in the events\n     * manager are notified","sourceCodeStart":1979,"sourceCodeEnd":2015,"githubUrl":"https://github.com/phalcon/cphalcon/blob/b7419de9cd0a8a3f48441ead84c9f8415d463e25/phalcon/Mvc/Model.zep#L1979-L2015","documentation":"Error \"Parameters passed must be of type array, string, numeric or null in '{className}'\" thrown in phalcon/cphalcon.","triggerScenarios":"Thrown at phalcon/Mvc/Model.zep:1997 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"}