File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -244,8 +244,8 @@ static void php_enchant_broker_free(zend_rsrc_list_entry *rsrc TSRMLS_DC) /* {{{
244
244
if (broker -> pbroker ) {
245
245
if (broker -> dictcnt && broker -> dict ) {
246
246
if (broker -> dict ) {
247
- int total , tofree ;
248
- tofree = total = broker -> dictcnt - 1 ;
247
+ int total ;
248
+ total = broker -> dictcnt - 1 ;
249
249
do {
250
250
zend_list_delete (broker -> dict [total ]-> rsrc_id );
251
251
efree (broker -> dict [total ]);
@@ -357,8 +357,8 @@ PHP_FUNCTION(enchant_broker_init)
357
357
enchant_broker * broker ;
358
358
EnchantBroker * pbroker ;
359
359
360
- if (ZEND_NUM_ARGS () ) {
361
- ZEND_WRONG_PARAM_COUNT () ;
360
+ if (zend_parse_parameters_none () == FAILURE ) {
361
+ return ;
362
362
}
363
363
364
364
pbroker = enchant_broker_init ();
@@ -542,6 +542,11 @@ PHP_FUNCTION(enchant_broker_request_dict)
542
542
}
543
543
544
544
PHP_ENCHANT_GET_BROKER ;
545
+
546
+ if (taglen == 0 ) {
547
+ php_error_docref (NULL TSRMLS_CC , E_WARNING , "Tag cannot be empty" );
548
+ RETURN_FALSE ;
549
+ }
545
550
546
551
d = enchant_broker_request_dict (pbroker -> pbroker , (const char * )tag );
547
552
if (d ) {
You can’t perform that action at this time.
0 commit comments