#23803 [NEW]: disp_invokeex won't work with multiple args.

From: Date: Sun, 25 May 2003 19:46:08 +0000
Subject: #23803 [NEW]: disp_invokeex won't work with multiple args.
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-40392@lists.php.net to get a copy of this message
From: eddie at omegaware dot com Operating system: PHP version: 4.3.1 PHP Bug Type: COM related Bug description: disp_invokeex won't work with multiple args. dispatch.c line 292 in function static HRESULT STDMETHODCALLTYPE disp_invokdeex will not give the expected results.. I found this while writing my own function to use call_user_function_ex to call a function with params.. And was searching through the PHP code to see how it was called elsewhere.. and this function is doing it the same way I was doing it.. which doesn't work.. in line 270 a zval *zarg is allocated. then it is initialized once for each argument.. the argument is assigned to the zarg then the address of the zarg is stored in the **params[] array. The problem is the *zarg has the same address for each iteration.. so every params[i]=&zarg will assign the same address for every parameter "i". so all the paramters will be the last parameter passed.. a zval ** needs to be allocated instead of a zval *.. so the address is different for each parameter.. since I capped the maximum number of params I just allocate a zval *zarg[4]; but a more dynamic solution would be better. -- Edit bug report at http://bugs.php.net/?id=23803&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=23803&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=23803&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=23803&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=23803&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=23803&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=23803&r=support Expected behavior: http://bugs.php.net/fix.php?id=23803&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=23803&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=23803&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=23803&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23803&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=23803&r=dst IIS Stability: http://bugs.php.net/fix.php?id=23803&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=23803&r=gnused

« previous php.bugs (#40392) next »