[2.0.x] Undefined index: 12 in phalcon/mvc/model/metadata.zep on line 288
The exception is thrown every time I try to save a model. Function which throws error is Phalcon\Mvc\Model\MetaData->readMetaDataIndex()
Everything worked fine until I updated 2.0.x branch via git and built a new phalcon extension. I use an annotations meta data. Did you guy change something I missed?
Got it! You introduced MODELS_DEFAULT_VALUES which was not returned in my Phalcon\Mvc\Model\MetaData\StrategyInterface. Works again.
Should be added to docs...
Can you explain how did you solve this?
Hey, like I said. My Phalcon\Mvc\Model\MetaData\StrategyInterface now returns an array including MODELS_DEFAULT_VALUES.
return array(
.
..
...
MetaData::MODELS_DEFAULT_VALUES => $defaultValues,
MetaData::MODELS_EMPTY_STRING_VALUES => $emptyStringValues
);
Look here for an example: https://github.com/PhalconEye/framework/blob/7ed523ad9f3eb33e0bc92ef87e2ae387be8c154d/src/Db/Model/Annotations/Metadata.php