Re: cvs: pear /PEAR pear.c
| From: | Andrei Zmievski | Date: | Thu, 15 Mar 2001 01:00:18 +0000 |
| Subject: | Re: cvs: pear /PEAR pear.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-4575@lists.php.net to get a copy of this message | ||
At 12:53 AM 3/15/01 +0000, Stig Bakken wrote:
+ if (options != NULL) {
+ zval **el0, **el1;
+ if (((*options)->type != IS_STRING && (*options)->type != IS_ARRAY) ||
+ ((*options)->type == IS_ARRAY &&
+ (zend_hash_num_elements((*options)->value.ht) != 2 ||
+ zend_hash_index_find((*options)->value.ht, 0, (void **)&el0) == FAILURE ||
+ zend_hash_index_find((*options)->value.ht, 1, (void **)&el1) == FAILURE ||
+ (*el0)->type != IS_OBJECT || (*el1)->type != IS_STRING))) {
+ php_error(E_USER_WARNING,
+ "PEAR::setErrorHandler: invalid error callback");
+ }
Stig,
You can now use zend_is_callable() to do the above check. Let me know if you need explanation of parameters.
-Andrei