php-src/ext/curl/tests/bug80121.phpt
Nikita Popov d96219c185 Fixed bug #80121
The issue affected both CurlHandle and CurlMultiHandle. I'll have
to double check this for other resource->object conversions as well.
2020-10-01 17:05:23 +02:00

27 lines
571 B
PHP

--TEST--
Bug #80121: Null pointer deref if CurlHandle directly instantiated
--FILE--
<?php
try {
new CurlHandle;
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
try {
new CurlMultiHandle;
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
try {
new CurlShareHandle;
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
Cannot directly construct CurlHandle, use curl_init() instead
Cannot directly construct CurlMultiHandle, use curl_multi_init() instead
Cannot directly construct CurlShareHandle, use curl_share_init() instead