File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,8 +44,8 @@ foreach ([
4444] as $ option ) {
4545 try {
4646 curl_setopt ($ ch , $ option , $ fp );
47- } catch (ValueError $ exception ) {
48- echo $ exception ->getMessage (), "\n" ;
47+ } catch (ValueError $ e ) {
48+ echo $ e ::class, ' : ' , $ e ->getMessage (), "\n" ;
4949 }
5050}
5151
@@ -54,8 +54,8 @@ is_file($tempfile) and @unlink($tempfile);
5454isset ($ tempname ) and is_file ($ tempname ) and @unlink ($ tempname );
5555?>
5656--EXPECT--
57- curl_setopt(): The file handle provided for CURLOPT_FILE must be writable
58- curl_setopt(): The file handle provided for CURLOPT_WRITEHEADER must be writable
59- curl_setopt(): The file handle provided for CURLOPT_STDERR must be writable
57+ ValueError: curl_setopt(): The file handle provided for CURLOPT_FILE must be writable
58+ ValueError: curl_setopt(): The file handle provided for CURLOPT_WRITEHEADER must be writable
59+ ValueError: curl_setopt(): The file handle provided for CURLOPT_STDERR must be writable
6060Hello World!
6161Hello World!
Original file line number Diff line number Diff line change @@ -9,12 +9,12 @@ $ch = curl_init();
99
1010try {
1111 curl_setopt ($ ch , CURLOPT_URL , $ url );
12- } catch (ValueError $ exception ) {
13- echo $ exception ->getMessage () . "\n" ;
12+ } catch (ValueError $ e ) {
13+ echo $ e ::class, ' : ' , $ e ->getMessage (), "\n" ;
1414}
1515
1616?>
1717Done
1818--EXPECT--
19- curl_setopt(): cURL option CURLOPT_URL must not contain any null bytes
19+ ValueError: curl_setopt(): cURL option CURLOPT_URL must not contain any null bytes
2020Done
You can’t perform that action at this time.
0 commit comments