]> granicus.if.org Git - php/commitdiff
- Fixed pcntl_signal() returning NULL when passing wrong parameters
authorMatteo Beccati <mbeccati@php.net>
Sat, 28 Mar 2009 01:31:31 +0000 (01:31 +0000)
committerMatteo Beccati <mbeccati@php.net>
Sat, 28 Mar 2009 01:31:31 +0000 (01:31 +0000)
ext/pcntl/pcntl.c
ext/pcntl/tests/pcntl_signal.phpt

index 414446a0497658c600a030e6c7274bb02577b44d..b9d64d95ef8a6f2d955f2ccf35fa8830812fe44e 100755 (executable)
@@ -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)) {
index 977f26fbcc2f5252002131f49c2210f986b9effc..324cc0b418c02b29ef5ae91108d7f250d466d236 100644 (file)
@@ -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