* pointing to the location of the dictionaries
*/
if(0 == RegOpenKey(HKEY_LOCAL_MACHINE, "Software\\Aspell", &hkey)) {
+ dwLen = sizeof(aspell_dir) - 1;
RegQueryValueEx(hkey, "", NULL, &dwType, (LPBYTE)&aspell_dir, &dwLen);
RegCloseKey(hkey);
strcpy(data_dir, aspell_dir);
if(pspell_error_number(ret) != 0){
php_error_docref(NULL TSRMLS_CC, E_WARNING, "PSPELL couldn't open the dictionary. reason: %s ", pspell_error_message(ret));
+ delete_pspell_manager(ret);
RETURN_FALSE;
}
* pointing to the location of the dictionaries
*/
if(0 == RegOpenKey(HKEY_LOCAL_MACHINE, "Software\\Aspell", &hkey)) {
+ dwLen = sizeof(aspell_dir) - 1;
RegQueryValueEx(hkey, "", NULL, &dwType, (LPBYTE)&aspell_dir, &dwLen);
RegCloseKey(hkey);
strcpy(data_dir, aspell_dir);
convert_to_string_ex(personal);
if (PG(safe_mode) && (!php_checkuid(Z_STRVAL_PP(personal), NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
+ delete_pspell_config(config);
RETURN_FALSE;
}
if (php_check_open_basedir(Z_STRVAL_PP(personal) TSRMLS_CC)) {
+ delete_pspell_config(config);
RETURN_FALSE;
}
if(pspell_error_number(ret) != 0){
php_error_docref(NULL TSRMLS_CC, E_WARNING, "PSPELL couldn't open the dictionary. reason: %s ", pspell_error_message(ret));
+ delete_pspell_manager(ret);
RETURN_FALSE;
}
if(pspell_error_number(ret) != 0){
php_error_docref(NULL TSRMLS_CC, E_WARNING, "PSPELL couldn't open the dictionary. reason: %s ", pspell_error_message(ret));
+ delete_pspell_manager(ret);
RETURN_FALSE;
}
/* If aspell was installed using installer, we should have a key
* pointing to the location of the dictionaries
*/
- if(0 == RegOpenKey(HKEY_LOCAL_MACHINE, "Software\\Aspell", &hkey)) {
- RegQueryValueEx(hkey, "", NULL, &dwType, (LPBYTE)&aspell_dir, &dwLen);
- RegCloseKey(hkey);
- strcpy(data_dir, aspell_dir);
- strcat(data_dir, "\\data");
- strcpy(dict_dir, aspell_dir);
- strcat(dict_dir, "\\dict");
-
- pspell_config_replace(config, "data-dir", data_dir);
- pspell_config_replace(config, "dict-dir", dict_dir);
- }
+ if(0 == RegOpenKey(HKEY_LOCAL_MACHINE, "Software\\Aspell", &hkey)) {
+ dwLen = sizeof(aspell_dir) - 1;
+ RegQueryValueEx(hkey, "", NULL, &dwType, (LPBYTE)&aspell_dir, &dwLen);
+ RegCloseKey(hkey);
+ strcpy(data_dir, aspell_dir);
+ strcat(data_dir, "\\data");
+ strcpy(dict_dir, aspell_dir);
+ strcat(dict_dir, "\\dict");
+
+ pspell_config_replace(config, "data-dir", data_dir);
+ pspell_config_replace(config, "dict-dir", dict_dir);
+ }
#endif
convert_to_string_ex(language);