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

ext/pcntl/pcntl.c
ext/pcntl/tests/pcntl_signal.phpt

index 91fcea3738033133b01cb94612cd6d528d87b02c..8dfcd6cba4fbeea096f6356769fa073486d2a075 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