Re: [PHP] Odd array_push issue

2011-05-11 Thread David Harkness
On Wed, May 11, 2011 at 1:50 PM, Peter Lind wrote: > I'd say there's a problem in your code. Check where you might be using > references, chances are you're using one somewhere and not unsetting > it afterwards. > Also make sure that the code that receives the final array isn't modifying the obj

Re: [PHP] Odd array_push issue

2011-05-11 Thread Peter Lind
On 11 May 2011 22:39, Richard S. Crawford wrote: > On Wed, May 11, 2011 at 1:30 PM, Peter Lind wrote: >> >> On 11 May 2011 22:23, Richard S. Crawford wrote: >> > I'm encountering what appears to be a bug in array_push when I try using >> > that function to add objects to an array. For example...

Re: [PHP] Odd array_push issue

2011-05-11 Thread Richard S. Crawford
On Wed, May 11, 2011 at 1:30 PM, Peter Lind wrote: > On 11 May 2011 22:23, Richard S. Crawford wrote: > > I'm encountering what appears to be a bug in array_push when I try using > > that function to add objects to an array. For example... > > > > A = Object 1 > > B = Object 2 > > > > If I execu

Re: [PHP] Odd array_push issue

2011-05-11 Thread David Harkness
On Wed, May 11, 2011 at 1:23 PM, Richard S. Crawford wrote: > If I execute the following code: > > array_push(objectarray, A); > array_push(objectarray, B); > > ...I expect the contents of $objectarray to be: > > [0] = A > [1] = B > > Instead, the last object pushed onto the array is repeated thro

Re: [PHP] Odd array_push issue

2011-05-11 Thread Peter Lind
On 11 May 2011 22:23, Richard S. Crawford wrote: > I'm encountering what appears to be a bug in array_push when I try using > that function to add objects to an array. For example... > > A = Object 1 > B = Object 2 > > If I execute the following code: > > array_push(objectarray, A); > array_push(o

[PHP] Odd array_push issue

2011-05-11 Thread Richard S. Crawford
I'm encountering what appears to be a bug in array_push when I try using that function to add objects to an array. For example... A = Object 1 B = Object 2 If I execute the following code: array_push(objectarray, A); array_push(objectarray, B); ...I expect the contents of $objectarray to be: [