Re: Help: problem in array handling
| From: | Venkat Raghavan | Date: | Tue, 02 Jul 2002 11:05:06 +0000 |
| Subject: | Re: Help: problem in array handling | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-85726@lists.php.net to get a copy of this message | ||
Thanx, Markus, for your prompt and "bull's eye" reply. That worked like
a beauty!
Also discovered some mistakes in our test script.
Thanx again,
Venkat
>>> Markus Fischer <mfischer@guru.josefine.at> 02/07/2002 16:05:43 >>>
On Tue, Jul 02, 2002 at 04:23:13AM -0600, Venkat Raghavan wrote :
> zval php_element;
[...]
> // Put element into array
> zend_hash_index_update(php_var->value.ht, (int)i,
(void*)&php_element, sizeof(zval*), NULL);
You put in the hash a static address of a variable which is
only known inside the local function scope? This doesn't look
right to me. You've to allocate the memory and put it into
the hash.