#44207 [NEW]: enchant_dict_check() used wrong in examples
| From: | mfischer@php.net | Date: | Thu, 21 Feb 2008 22:35:03 +0000 |
| Subject: | #44207 [NEW]: enchant_dict_check() used wrong in examples | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-532@lists.php.net to get a copy of this message | ||
From: mfischer@php.net
Operating system:
PHP version: Irrelevant
PHP Bug Type: Documentation problem
Bug description: enchant_dict_check() used wrong in examples
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 bug report at http://bugs.php.net/?id=44207&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44207&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44207&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44207&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44207&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=44207&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=44207&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=44207&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=44207&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=44207&r=support
Expected behavior: http://bugs.php.net/fix.php?id=44207&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=44207&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=44207&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44207&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44207&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44207&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=44207&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=44207&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=44207&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=44207&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=44207&r=mysqlcfg