Re: PHP 4.0 Bug #4768: zend_get_parameters_ex() trashes parameters if param_count < ARG_COUNT(ht)

From: Date: Fri, 02 Jun 2000 06:50:54 +0000
Subject: Re: PHP 4.0 Bug #4768: zend_get_parameters_ex() trashes parameters if param_count < ARG_COUNT(ht)
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-20073@lists.php.net to get a copy of this message
Followup to the original bug report Postscript 2: it seems, from further testing, that the using the zend_get_parameter_xxx functions are one-shot deals - i.e. once you use them, then further actions on ht may produce spurious results. example : i did the following (as described in the postscript to the original bug report) zend_get_parameters_array_ex(argCount,args) later on i tried the following : if (!ParameterPassedByReference(ht,i)) { php_error(E_WARNING,"vars must be passed by ref"); } however the error print whether args are passed by ref or not. if i do the following : if (! PZVAL_ISREF( *args[i])) { php_error(E_WARNING,"vars must be passed by ref"); } then i get the correct behaviour. i hope this helps someone else. perhaps this behaviour can be document in the PHP developer docs. clayton collie PHP Enthusiast (PHPnut)

« previous php.dev (#20073) next »