]> granicus.if.org Git - php/commitdiff
Promote warning to exception in ext/enchant
authorMáté Kocsis <kocsismate@woohoolabs.com>
Wed, 19 Aug 2020 20:43:07 +0000 (22:43 +0200)
committerMáté Kocsis <kocsismate@woohoolabs.com>
Mon, 24 Aug 2020 15:37:20 +0000 (17:37 +0200)
Closes GH-6022

ext/enchant/enchant.c

index 3ebb76e910f3aa21d639c3ebb03951edf696676d..566197582073cc8b55e6f115cb3ccc5384b4dd71 100644 (file)
@@ -307,8 +307,8 @@ PHP_FUNCTION(enchant_broker_free)
        PHP_ENCHANT_GET_BROKER;
 
        if (pbroker->nb_dict > 0) {
-               php_error_docref(NULL, E_WARNING, "Cannot free EnchantBroker object with open EnchantDictionary objects");
-               RETURN_FALSE;
+               zend_throw_error(NULL, "Cannot free EnchantBroker object with open EnchantDictionary objects");
+               RETURN_THROWS();
        }
        if (pbroker->pbroker) {
                enchant_broker_free(pbroker->pbroker);