mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
d96219c185
The issue affected both CurlHandle and CurlMultiHandle. I'll have to double check this for other resource->object conversions as well.
27 lines
571 B
PHP
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
|