phalcon/cphalcon · error · Phalcon\Mvc\Model\MetaData\Exceptions\ColumnMapNotArray
columnMap() not returned an array
Error message
columnMap() not returned an array
What it means
Error "columnMap() not returned an array" thrown in phalcon/cphalcon.
Source
Thrown at phalcon/Mvc/Model/MetaData/Strategy/Introspection.zep:43
{
/**
* Read the model's column map, this can't be inferred
*/
final public function getColumnMaps(<ModelInterface> model, <DiInterface> container) -> array
{
var orderedColumnMap, userColumnMap, reversedColumnMap, name, userName;
let orderedColumnMap = null;
let reversedColumnMap = null;
/**
* Check for a columnMap() method on the model
*/
if method_exists(model, "columnMap") {
let userColumnMap = model->{"columnMap"}();
if unlikely typeof userColumnMap != "array" {
throw new ColumnMapNotArray();
}
let reversedColumnMap = [],
orderedColumnMap = userColumnMap;
for name, userName in userColumnMap {
let reversedColumnMap[userName] = name;
}
}
/**
* Store the column map
*/
return [orderedColumnMap, reversedColumnMap];
}
/**
* The meta-data is obtained by reading the column descriptions from the database information schemaView on GitHub (pinned to b7419de9cd)
When it happens
Trigger: Thrown at phalcon/Mvc/Model/MetaData/Strategy/Introspection.zep:43 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of phalcon/cphalcon@b7419de9cd (2026-08-21).
Data as JSON: /api/errors/53295bfca3ad01f9.
Report an issue: GitHub.