1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/enchant/tests/invalidobj.phpt
Niels Dossche 9187caeab1 Fix ext/enchant test SKIPIFs
The resource check makes no sense, and the is_array() check doesn't
achieve anything. Drop the former, and replace the latter with a !
check.
Discovered while working on GH-18729.

Closes GH-18731.
2025-06-01 18:21:23 +02:00

25 lines
408 B
PHP

--TEST--
invalid object raise exception() function
--EXTENSIONS--
enchant
--FILE--
<?php
$broker = enchant_broker_init();
if (is_object($broker)) {
echo "OK\n";
@enchant_broker_free($broker);
try {
@enchant_broker_free($broker);
} catch (ValueError $e) {
echo $e->getMessage()."\n";
}
} else {
exit("init failed\n");
}
echo "OK\n";
?>
--EXPECT--
OK
Invalid or uninitialized EnchantBroker object
OK