xref: /PHP-8.0/ext/curl/tests/bug80121.phpt (revision d96219c1)
1--TEST--
2Bug #80121: Null pointer deref if CurlHandle directly instantiated
3--FILE--
4<?php
5
6try {
7    new CurlHandle;
8} catch (Error $e) {
9    echo $e->getMessage(), "\n";
10}
11try {
12    new CurlMultiHandle;
13} catch (Error $e) {
14    echo $e->getMessage(), "\n";
15}
16try {
17    new CurlShareHandle;
18} catch (Error $e) {
19    echo $e->getMessage(), "\n";
20}
21
22?>
23--EXPECT--
24Cannot directly construct CurlHandle, use curl_init() instead
25Cannot directly construct CurlMultiHandle, use curl_multi_init() instead
26Cannot directly construct CurlShareHandle, use curl_share_init() instead
27