summaryrefslogtreecommitdiff
path: root/ext/sockets/tests/socket_sendto_params.phpt
diff options
context:
space:
mode:
authorGeorge Peter Banyard <girgias@php.net>2020-01-10 15:54:08 +0100
committerGeorge Peter Banyard <girgias@php.net>2020-04-21 20:41:26 +0200
commit7ff8eaa5451275a5ce97b29381fc08412e6489d7 (patch)
treeab20dad68a6009d8bff7872bec5abbfd5fae50f7 /ext/sockets/tests/socket_sendto_params.phpt
parent2aa661887f2f313d5dbac04f78f07ab59c06d6d8 (diff)
downloadphp-git-7ff8eaa5451275a5ce97b29381fc08412e6489d7.tar.gz
Promote warnings to Errors in sockets's extension.
Diffstat (limited to 'ext/sockets/tests/socket_sendto_params.phpt')
-rw-r--r--ext/sockets/tests/socket_sendto_params.phpt10
1 files changed, 7 insertions, 3 deletions
diff --git a/ext/sockets/tests/socket_sendto_params.phpt b/ext/sockets/tests/socket_sendto_params.phpt
index e4808a93ee..09cb859ad7 100644
--- a/ext/sockets/tests/socket_sendto_params.phpt
+++ b/ext/sockets/tests/socket_sendto_params.phpt
@@ -9,8 +9,12 @@ ext/sockets - socket_sendto - test with incorrect parameters
--FILE--
<?php
$s_c = socket_create_listen(0);
- $s_w = socket_sendto($s_c, "foo", -1, MSG_OOB, '127.0.0.1');
+ try {
+ $s_w = socket_sendto($s_c, "foo", -1, MSG_OOB, '127.0.0.1');
+ } catch (\ValueError $e) {
+ echo $e->getMessage() . \PHP_EOL;
+ }
socket_close($s_c);
?>
---EXPECTF--
-Warning: socket_sendto(): Length cannot be negative in %s on line %i
+--EXPECT--
+socket_sendto(): Argument #3 ($len) must be greater than or equal to 0