convert_to_long_ex(conf);
config = (PspellConfig *) zend_list_find(Z_LVAL_PP(conf), &type);
+
+ if (config == NULL || type != le_pspell_config) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not a PSPELL config index", Z_LVAL_PP(conf));
+ RETURN_FALSE;
+ }
+
ret = new_pspell_manager(config);
if(pspell_error_number(ret) != 0){
convert_to_string_ex(word);
manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
if(!manager){
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not an PSPELL result index",Z_LVAL_PP(scin));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not a PSPELL result index",Z_LVAL_PP(scin));
RETURN_FALSE;
}
convert_to_string_ex(word);
manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
if(!manager){
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not an PSPELL result index",Z_LVAL_PP(scin));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not a PSPELL result index",Z_LVAL_PP(scin));
RETURN_FALSE;
}
convert_to_string_ex(corr);
manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
if(!manager){
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not an PSPELL result index",Z_LVAL_PP(scin));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not a PSPELL result index",Z_LVAL_PP(scin));
RETURN_FALSE;
}
convert_to_string_ex(word);
manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
if(!manager){
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not an PSPELL result index",Z_LVAL_PP(scin));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not a PSPELL result index",Z_LVAL_PP(scin));
RETURN_FALSE;
}
convert_to_string_ex(word);
manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
if(!manager){
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not an PSPELL result index",Z_LVAL_PP(scin));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not a PSPELL result index",Z_LVAL_PP(scin));
RETURN_FALSE;
}
convert_to_long_ex(scin);
manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
if(!manager){
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not an PSPELL result index",Z_LVAL_PP(scin));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not a PSPELL result index",Z_LVAL_PP(scin));
RETURN_FALSE;
}
convert_to_long_ex(scin);
manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
if(!manager){
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not an PSPELL result index",Z_LVAL_PP(scin));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not a PSPELL result index",Z_LVAL_PP(scin));
RETURN_FALSE;
}
convert_to_long_ex(sccin);
config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
if(!config){
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not an PSPELL config index",Z_LVAL_PP(sccin));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not a PSPELL config index",Z_LVAL_PP(sccin));
RETURN_FALSE;
}
convert_to_long_ex(sccin);
config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
if(!config){
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not an PSPELL config index",Z_LVAL_PP(sccin));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not a PSPELL config index",Z_LVAL_PP(sccin));
RETURN_FALSE;
}
convert_to_long_ex(sccin);
config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
if(!config){
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not an PSPELL config index",Z_LVAL_PP(sccin));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not a PSPELL config index",Z_LVAL_PP(sccin));
RETURN_FALSE;
}
convert_to_long_ex(sccin);
config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
if(!config){
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not an PSPELL config index",Z_LVAL_PP(sccin));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not a PSPELL config index",Z_LVAL_PP(sccin));
RETURN_FALSE;
}
convert_to_long_ex(sccin);
config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
if(!config){
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not an PSPELL config index",Z_LVAL_PP(sccin));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not a PSPELL config index",Z_LVAL_PP(sccin));
RETURN_FALSE;
}
convert_to_long_ex(sccin);
config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
if(!config){
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not an PSPELL config index",Z_LVAL_PP(sccin));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not a PSPELL config index",Z_LVAL_PP(sccin));
RETURN_FALSE;
}