#44207 [Ver->Csd]: enchant_dict_check() used wrong in examples

From: Date: Fri, 07 Nov 2008 11:39:13 +0000
Subject: #44207 [Ver->Csd]: enchant_dict_check() used wrong in examples
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-1429@lists.php.net to get a copy of this message
ID: 44207 Updated by: vrana@php.net Reported By: mfischer@php.net -Status: Verified +Status: Closed Bug Type: Documentation problem PHP Version: Irrelevant New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2008-02-21 22:35:03] mfischer@php.net Description: ------------ enchant_dict_check() is document (and behaves) like this: bool enchant_dict_check ( resource $dict , string $word ) If the word is correctly spelled return TRUE, otherwise return FALSE However, the example on quite some pages seem to suggest that enchant_dict_check() once return an integer indicated some number of spelling errors. The result of enchant_dict_check() is used in an if($result), effectively preventing the example from actually working because on wrong spelled words the $result if false. The examples on these pages thus seem incorrect to me: http://php.net/manual/en/ref.enchant.php http://php.net/manual/en/function.enchant-dict-suggest.php ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=44207&edit=1

« previous php.doc.bugs (#1429) next »