octobercms/october · error · SystemException
The static method ':method()' on :class does not return a va
Error message
The static method ':method()' on :class does not return a valid options array.
What it means
Error "The static method ':method()' on :class does not return a valid options array." thrown in octobercms/october.
Source
Thrown at modules/backend/classes/FormField.php:536
// Cast collections to array
if ($fieldOptions instanceof Collection) {
$fieldOptions = $fieldOptions->all();
}
return $fieldOptions;
}
/**
* getOptionsFromModelAsString where options are an explicit method reference
*/
protected function getOptionsFromModelAsString($model, string $methodName, $data)
{
// Calling via ClassName::method
if ($callableMethod = $this->getCallableMethodFromValue($methodName)) {
$fieldOptions = $callableMethod($model, $this);
if (!is_array($fieldOptions)) {
throw new SystemException(Lang::get('backend::lang.field.options_static_method_invalid_value', [
'class' => $callableMethod[0],
'method' => $callableMethod[1]
]));
}
}
// Calling via $model->method
else {
if (!$this->objectMethodExists($model, $methodName)) {
throw new SystemException(Lang::get('backend::lang.field.options_method_not_exists', [
'model' => get_class($model),
'method' => $methodName,
'field' => $this->fieldName
]));
}
$fieldOptions = $model->$methodName($this->value, $this->fieldName, $data);
}
View on GitHub (pinned to b608633a7e)
When it happens
Trigger: Thrown at modules/backend/classes/FormField.php:536 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of octobercms/october@b608633a7e (2026-08-21).
Data as JSON: /api/errors/b3641cbea55dbf40.
Report an issue: GitHub.