File tree 1 file changed +5
-6
lines changed
1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ Test posix_ttyname() with wrong parameters
3
3
--DESCRIPTION--
4
4
Gets the absolute path to the current terminal device that is open on a given file descriptor.
5
5
Source code: ext/posix/posix.c
6
+
6
7
--CREDITS--
7
8
Falko Menge, mail at falko-menge dot de
8
9
PHP Testfest Berlin 2009-05-10
@@ -11,18 +12,16 @@ PHP Testfest Berlin 2009-05-10
11
12
if (!extension_loaded ('posix ' )) {
12
13
die ('SKIP - POSIX extension not available ' );
13
14
}
14
- if (!extension_loaded ('gd ' )) {
15
- die ('SKIP - GD extension not available ' );
16
- }
17
- if (!function_exists ('imagecreate ' )) {
18
- die ('SKIP - Function imagecreate() not available ' );
15
+
16
+ if (!function_exists ('curl_init ' )) {
17
+ die ('SKIP - Function curl_init() not available ' );
19
18
}
20
19
?>
21
20
--FILE--
22
21
<?php
23
22
var_dump (posix_ttyname (0 )); // param not a ressource
24
23
try {
25
- var_dump (posix_ttyname (imagecreate ( 1 , 1 ))); // wrong resource type
24
+ var_dump (posix_ttyname (curl_init ( ))); // wrong resource type
26
25
} catch (TypeError $ e ) {
27
26
echo $ e ->getMessage (), "\n" ;
28
27
}
You can’t perform that action at this time.
0 commit comments