The error functions do so because they are likely to be called if creation of a connection fails so there may not always be a valid resource. The state checking function would presumably be only run on a valid connection and consequently should be strict about the resource parameter (IMO).

Ilia

Markus Bertheau wrote:
Ð ÐÐÐ, 08.11.2004, Ð 16:04, John Coggeshall ÐÐÑÐÑ:

if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET,  ZEND_NUM_ARGS()
TSRMLS_CC, "r" ......

why would you silence the error for the parameter when this function
requires a valid Postgres resource to do anything?


I copied the behaviour from pg_result_error(), so the answer is because
pg_result_error() does it too.

Markus


-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to