Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NFR]When not found option renturn null #1530

Merged
merged 2 commits into from
Nov 8, 2013
Merged

[NFR]When not found option renturn null #1530

merged 2 commits into from
Nov 8, 2013

Conversation

dreamsxin
Copy link
Contributor

        $this->validate(new StringLengthValidator(array(
            'max' => 20,
            'min' => 1,
            'messageMaximum' => 'messageMaximum',
            'messageMinimum' => 'messageMinimum'
        )));

That must be throw error

    PHALCON_INIT_VAR(field);
    phalcon_call_method_p1(field, this_ptr, "getoption", option);
    if (Z_TYPE_P(field) != IS_STRING) {
        PHALCON_THROW_EXCEPTION_STR(phalcon_mvc_model_exception_ce, "Field name must be a string");
        return;
    }
PHP_METHOD(Phalcon_Mvc_Model_Validator, getOption){
    // ```
    RETURN_MM_EMPTY_STRING(); // change to RETURN_MM_NULL()
}

phalcon pushed a commit that referenced this pull request Nov 8, 2013
[NFR]When not found option renturn null
@phalcon phalcon merged commit 55cc262 into phalcon:1.2.5 Nov 8, 2013
@dreamsxin dreamsxin deleted the model_validator branch April 15, 2014 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants