{"record":{"id":"53295bfca3ad01f9","repo":"phalcon/cphalcon","slug":"columnmap-not-returned-an-array","errorCode":null,"errorMessage":"columnMap() not returned an array","messagePattern":"columnMap\\(\\) not returned an array","errorType":"exception","errorClass":"Phalcon\\Mvc\\Model\\MetaData\\Exceptions\\ColumnMapNotArray","httpStatus":null,"severity":"error","filePath":"phalcon/Mvc/Model/MetaData/Strategy/Introspection.zep","lineNumber":43,"sourceCode":"{\n    /**\n     * Read the model's column map, this can't be inferred\n     */\n    final public function getColumnMaps(<ModelInterface> model, <DiInterface> container) -> array\n    {\n        var orderedColumnMap, userColumnMap, reversedColumnMap, name, userName;\n\n        let orderedColumnMap = null;\n        let reversedColumnMap = null;\n\n        /**\n         * Check for a columnMap() method on the model\n         */\n        if method_exists(model, \"columnMap\") {\n            let userColumnMap = model->{\"columnMap\"}();\n\n            if unlikely typeof userColumnMap != \"array\" {\n                throw new ColumnMapNotArray();\n            }\n\n            let reversedColumnMap = [],\n                orderedColumnMap = userColumnMap;\n\n            for name, userName in userColumnMap {\n                let reversedColumnMap[userName] = name;\n            }\n        }\n\n        /**\n         * Store the column map\n         */\n        return [orderedColumnMap, reversedColumnMap];\n    }\n\n    /**\n     * The meta-data is obtained by reading the column descriptions from the database information schema","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/phalcon/cphalcon/blob/b7419de9cd0a8a3f48441ead84c9f8415d463e25/phalcon/Mvc/Model/MetaData/Strategy/Introspection.zep#L25-L61","documentation":"Error \"columnMap() not returned an array\" thrown in phalcon/cphalcon.","triggerScenarios":"Thrown at phalcon/Mvc/Model/MetaData/Strategy/Introspection.zep:43 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"}