Skip to content
This repository has been archived by the owner on Dec 11, 2022. It is now read-only.

The meta-data is invalid or is corrupt problem. #6

Open
zikezhang opened this issue Dec 18, 2015 · 3 comments
Open

The meta-data is invalid or is corrupt problem. #6

zikezhang opened this issue Dec 18, 2015 · 3 comments

Comments

@zikezhang
Copy link
Contributor

Hi , May I know how did you work it out ?

https://forum.phalconphp.com/discussion/7335/phalcon-203-the-metadata-is-invalid-or-is-corrupt

@nguyenducduy
Copy link
Owner

it problem occured when running out of phalcon version updated, i was update source for lastest version.

@zikezhang
Copy link
Contributor Author

Yes, I used the latest version of Phalcon, but this problem is still occured.

@nguyenducduy
Copy link
Owner

@@ it occured because i did not defined default value of meta data annotations, add this code to fix it.

/Files AnnotationsMetaDataInitializer.php/

public function getMetaData(ModelInterface $model, DiInterface $di)
{
...
// Default values for columns
PhalconMetadata::MODELS_DEFAULT_VALUES => [],

        // Fields that allow empty strings
        PhalconMetadata::MODELS_EMPTY_STRING_VALUES => []

}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants