phalcon/cphalcon · error · Phalcon\Mvc\Model\Exceptions\InvalidReturnedRecord
The returned record is not valid
Error message
The returned record is not valid
What it means
Error "The returned record is not valid" thrown in phalcon/cphalcon.
Source
Thrown at phalcon/Mvc/Model/Resultset.zep:275
public function delete(<Closure> conditionCallback = null) -> bool
{
bool result, transaction;
var record, connection = null;
let result = true;
let transaction = false;
this->rewind();
while this->valid() {
let record = this->current();
if transaction === false {
/**
* We only can delete resultsets if every element is a complete object
*/
if unlikely !method_exists(record, "getWriteConnection") {
throw new InvalidReturnedRecord();
}
let connection = record->getWriteConnection(),
transaction = true;
connection->begin();
}
/**
* Perform additional validations
*/
if typeof conditionCallback == "object" {
if call_user_func_array(conditionCallback, [record]) === false {
this->next();
continue;
}
}View on GitHub (pinned to b7419de9cd)
When it happens
Trigger: Thrown at phalcon/Mvc/Model/Resultset.zep:275 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/8846d5c298aacb64.
Report an issue: GitHub.