diff -r 2f6f6f7551ca -r 32102edaa81b web/wp-includes/js/tinymce/plugins/spellchecker/classes/EnchantSpell.php --- a/web/wp-includes/js/tinymce/plugins/spellchecker/classes/EnchantSpell.php Thu Sep 16 15:45:36 2010 +0000 +++ b/web/wp-includes/js/tinymce/plugins/spellchecker/classes/EnchantSpell.php Mon Nov 19 18:26:13 2012 +0100 @@ -48,20 +48,24 @@ */ function &getSuggestions($lang, $word) { $r = enchant_broker_init(); - $suggs = array(); if (enchant_broker_dict_exists($r,$lang)) { $d = enchant_broker_request_dict($r, $lang); $suggs = enchant_dict_suggest($d, $word); + // enchant_dict_suggest() sometimes returns NULL + if (!is_array($suggs)) + $suggs = array(); + enchant_broker_free_dict($d); } else { + $suggs = array(); + } - } enchant_broker_free($r); return $suggs; } } -?> \ No newline at end of file +?>