-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed bug #53070 (enchant_broker_get_path crashes if no path is set)
enchant_broker_get_dict_path segfaults when the dict path is not setup, instead of segfaulting return false instead.
- Loading branch information
Showing
3 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--TEST-- | ||
Bug #53070 (enchant_broker_get_path crashes if no path is set) | ||
--SKIPIF-- | ||
<?php | ||
if(!extension_loaded('enchant')) die('skip, enchant not loader'); | ||
if (!is_resource(enchant_broker_init())) {die("skip, resource dont load\n");} | ||
?> | ||
--FILE-- | ||
<?php | ||
$broker = enchant_broker_init(); | ||
var_dump(enchant_broker_get_dict_path($broker, ENCHANT_MYSPELL)); | ||
var_dump(enchant_broker_get_dict_path($broker, ENCHANT_ISPELL)); | ||
?> | ||
--EXPECTF-- | ||
|
||
Warning: enchant_broker_get_dict_path(): dict_path not set in %s on line %d | ||
bool(false) | ||
|
||
Warning: enchant_broker_get_dict_path(): dict_path not set in %s on line %d | ||
bool(false) |