Skip to content

Commit c88dbc2

Browse files
committed
- Fixed bug #53070 (Calling enchant_broker_get_dict_path before set_path crashes php)
1 parent e9dc878 commit c88dbc2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ext/enchant/enchant.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,8 @@ PHP_FUNCTION(enchant_broker_set_dict_path)
433433
if (!value_len) {
434434
RETURN_FALSE;
435435
}
436+
437+
PHP_ENCHANT_GET_BROKER;
436438

437439
switch (dict_type) {
438440
case PHP_ENCHANT_MYSPELL:
@@ -466,6 +468,8 @@ PHP_FUNCTION(enchant_broker_get_dict_path)
466468
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &broker, &dict_type) == FAILURE) {
467469
RETURN_FALSE;
468470
}
471+
472+
PHP_ENCHANT_GET_BROKER;
469473

470474
switch (dict_type) {
471475
case PHP_ENCHANT_MYSPELL:

0 commit comments

Comments
 (0)