Hi,

Using the following code snippet

function doHead() {
        header("Last-Modified: " . gmdate("D, d M Y H:i:s", 
getlastmod()) . " GMT");
        if (func_num_args() == 2) {
          doTitle(func_get_arg(0), func_get_arg(1));
        }
        else {
          doTitle(func_get_arg(0));
        }

if I pass 2 argument into the function then I get the following error
*
Fatal error*: func_get_arg(): Can't be used as a function parameter


but passing 1 argument is ok as is using the following code with 2 arguments

function doHead() {
        header("Last-Modified: " . gmdate("D, d M Y H:i:s", 
getlastmod()) . " GMT");
        if (func_num_args() == 2) {
          $a = func_get_arg(0);
          $b = func_get_arg(1);
          doTitle($a, $b);
        }
        else {
          doTitle(func_get_arg(0));
        }

Is there a particualr reason for this or is it a bug? PHP/4.1.2 on 
Debian Stable (PowerPC)

/James

-- 
Technology is a word that describes something that doesn't work yet.
        Douglas Adams




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to