summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2010-10-16 17:52:01 +0000
committerFelipe Pena <felipe@php.net>2010-10-16 17:52:01 +0000
commit946f95c0fc74cae4843f36f77e701e9e19911da9 (patch)
tree070860caf6a345eaf6722bbbd7d86b41c7b5bfaa
parent3ab0b74de9a005fe027c563cc366192f59d6251b (diff)
downloadphp-git-946f95c0fc74cae4843f36f77e701e9e19911da9.tar.gz
- Fixed bug #53070 (Calling enchant_broker_get_dict_path before set_path crashes php)
-rwxr-xr-xext/enchant/enchant.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/enchant/enchant.c b/ext/enchant/enchant.c
index 96d9287d10..14ea003ebe 100755
--- a/ext/enchant/enchant.c
+++ b/ext/enchant/enchant.c
@@ -433,6 +433,8 @@ PHP_FUNCTION(enchant_broker_set_dict_path)
if (!value_len) {
RETURN_FALSE;
}
+
+ PHP_ENCHANT_GET_BROKER;
switch (dict_type) {
case PHP_ENCHANT_MYSPELL:
@@ -466,6 +468,8 @@ PHP_FUNCTION(enchant_broker_get_dict_path)
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &broker, &dict_type) == FAILURE) {
RETURN_FALSE;
}
+
+ PHP_ENCHANT_GET_BROKER;
switch (dict_type) {
case PHP_ENCHANT_MYSPELL: