Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:2469 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25090 invoked from network); 20 Jun 2003 19:01:18 -0000 Received: from unknown (HELO mail.revelex.com) (64.94.57.177) by pb1.pair.com with SMTP; 20 Jun 2003 19:01:18 -0000 Received: from chasey.revelex.com (ip-172-16-10-75.revelex.com [172.16.10.75]) by mail.revelex.com (Postfix) with ESMTP id 340D9702EB for ; Fri, 20 Jun 2003 15:01:18 -0400 (EDT) Received: by chasey.revelex.com (Postfix, from userid 1000) id 233486B2D7; Fri, 20 Jun 2003 14:57:39 -0400 (EDT) Date: Fri, 20 Jun 2003 14:57:39 -0400 To: internals@lists.php.net Message-ID: <20030620185739.GB1502@chasey.revelex.com> Mail-Followup-To: internals@lists.php.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: Linux chasey.revelex.com 2.4.19-gentoo-r10 User-Agent: Mutt/1.5.4i Subject: call_user_function/wddx_serialize_vars Question From: jhughes@revelex.com (Jeraimee Hughes) I'm using the code below to use call_user_function to attempt to make a wddx packet. What I'm getting is the following wddx packet:
Obviously I'm passing something incorrectly to call_user_function, but since this is my first time using call_user_function I'm not sure what. Note that I've tested the params array against IS_ARRAY and it passes. zend_print_pval_r() also shows the right data within the array. Any pointers on what I've screwed up here? -----------------8<----------------------------- /* Excuse the debugging and extra code */ char *spname = NULL; char *dbname = NULL; char *func_name = "wddx_serialize_vars"; int argc = ZEND_NUM_ARGS(); int spname_len; int dbname_len; int i; int cnt; zval *params; zval *function_name; zval *params_wddx = NULL; zval *params_array; MAKE_STD_ZVAL(function_name); ZVAL_STRING(function_name, func_name, 1); MAKE_STD_ZVAL(params_array); array_init(params_array); if (zend_parse_parameters(argc TSRMLS_CC, "sas", &spname, &spname_len, ¶ms, &dbname, &dbname_len) == FAILURE) { return; } if (Z_TYPE_P(params) == IS_ARRAY) { zend_printf("\n%s\n", "params is an array"); } else { zend_printf("\n%s\n", "params is not an array"); } add_index_zval(params_array, 0, params); if (FAILURE == call_user_function(CG(function_table), NULL, function_name, ¶ms_wddx, 1, ¶ms_array TSRMLS_CC)) { zend_printf("%s\n", *function_name); zend_error(E_ERROR, "Function call failed"); } zend_printf("\n%s\n", params_wddx); ----------------->8----------------------------- --- Jeraimee