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


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to