[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-doc-bugs
Subject:    [DOC-BUGS] #44207 [NEW]: enchant_dict_check() used wrong in examples
From:       "mfischer () php ! net" <doc-bugs () lists ! php ! net>
Date:       2008-02-21 22:35:03
Message-ID: bug-44207 () bugs ! php ! net
[Download RAW message or body]

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

-- 
PHP Documentation Bugs Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic