From: Matteo Beccati Date: Sat, 28 Mar 2009 01:31:31 +0000 (+0000) Subject: - Fixed pcntl_signal() returning NULL when passing wrong parameters X-Git-Tag: php-5.4.0alpha1~191^2~4035 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0c58cbcea025db624fc380f84eeb0905f8788aab;p=php - Fixed pcntl_signal() returning NULL when passing wrong parameters --- diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c index 414446a049..b9d64d95ef 100755 --- a/ext/pcntl/pcntl.c +++ b/ext/pcntl/pcntl.c @@ -757,7 +757,7 @@ PHP_FUNCTION(pcntl_signal) zend_bool restart_syscalls = 1; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lz|b", &signo, &handle, &restart_syscalls) == FAILURE) { - return; + RETURN_FALSE; } if (!PCNTL_G(spares)) { diff --git a/ext/pcntl/tests/pcntl_signal.phpt b/ext/pcntl/tests/pcntl_signal.phpt index 977f26fbcc..324cc0b418 100644 --- a/ext/pcntl/tests/pcntl_signal.phpt +++ b/ext/pcntl/tests/pcntl_signal.phpt @@ -25,7 +25,7 @@ echo "ok\n"; signal dispatched Warning: pcntl_signal() expects at least 2 parameters, 0 given in %s -NULL +bool(false) bool(true) Warning: pcntl_signal(): Invalid value for handle argument specified in %s