|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2012-09-20 11:11 UTC] robert dot johnson at icap dot com
Description:
------------
Calling enchant_broker_free_dict destroys the resource created by enchant_broker_init(), instead of just the dictionary resource.
Test script:
---------------
if ( PHP_SAPI != 'cli' )
header('Content-Type:text/plain;charset=UTF-8');
$r = enchant_broker_init();
debug_zval_dump($r);
$d = enchant_broker_request_pwl_dict($r, 'c:\mydict.dic');
enchant_broker_free_dict($d);
debug_zval_dump($r);
echo "End.\r\n";
Expected result:
----------------
resource(1) of type (enchant_broker) refcount(2)
resource(1) of type (enchant_broker) refcount(2)
End.
Actual result:
--------------
resource(1) of type (enchant_broker) refcount(2)
resource(1) of type (Unknown) refcount(2)
End.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 23:00:01 2025 UTC |
This code works, so bug is probably related to function enchant_broker_request_pwl_dict(): if ( PHP_SAPI != 'cli' ) header('Content-Type:text/plain;charset=UTF-8'); $r = enchant_broker_init(); debug_zval_dump($r); $d = enchant_broker_request_dict($r, 'en-gb'); enchant_broker_free_dict($d); debug_zval_dump($r); echo "End.\r\n"; Result: resource(1) of type (enchant_broker) refcount(2) resource(1) of type (enchant_broker) refcount(2) End.