phalcon/cphalcon — pull request #1530 by dreamsxin (2013-11-07 03:00:42+00:00)
Title: [NFR]When not found option renturn null

```php
$this->validate(new StringLengthValidator(array(
'max' => 20,
'min' => 1,
'messageMaximum' => 'messageMaximum',
'messageMinimum' => 'messageMinimum'
)));
```
That must be throw error
```c
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;
}
```
```c
PHP_METHOD(Phalcon_Mvc_Model_Validator, getOption){

zval *option, *options, *value;

PHALCON_MM_GROW();

phalcon_fetch_params(1, 1, 0, &option);

PHALCON_OBS_VAR(options);
phalcon_read_property_this(&options, this_ptr, SL("_options"), PH_NOISY_CC);
if (phalcon_array_isset(options, option)) {
PHALCON_OBS_VAR(value);
phalcon_array_fetch(&value, options, option, PH_NOISY);
RETURN_CCTOR(value);
}

RETURN_MM_EMPTY_STRING();
}
```