Skip to content

Instantly share code, notes, and snippets.

@cmb69

cmb69/.diff Secret

Created September 18, 2019 19:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmb69/dd386321d1cc6504bc9031bf3a687e7f to your computer and use it in GitHub Desktop.
Save cmb69/dd386321d1cc6504bc9031bf3a687e7f to your computer and use it in GitHub Desktop.
posix_ttyname_error_wrongparams.phpt
ext/posix/tests/posix_ttyname_error_wrongparams.phpt | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/ext/posix/tests/posix_ttyname_error_wrongparams.phpt b/ext/posix/tests/posix_ttyname_error_wrongparams.phpt
index 6dcb1d324d..ce37f17df8 100644
--- a/ext/posix/tests/posix_ttyname_error_wrongparams.phpt
+++ b/ext/posix/tests/posix_ttyname_error_wrongparams.phpt
@@ -11,18 +11,15 @@ PHP Testfest Berlin 2009-05-10
if (!extension_loaded('posix')) {
die('SKIP - POSIX extension not available');
}
- if (!extension_loaded('gd')) {
- die('SKIP - GD extension not available');
- }
- if (!function_exists('imagecreate')) {
- die('SKIP - Function imagecreate() not available');
+ if (!extension_loaded('curl')) {
+ die('SKIP - curl extension not available');
}
?>
--FILE--
<?php
var_dump(posix_ttyname(0)); // param not a ressource
try {
- var_dump(posix_ttyname(imagecreate(1, 1))); // wrong resource type
+ var_dump(curl_init()); // wrong resource type
} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment