ZF-219: insert() parameter is array reference, so it cannot be an array literal


That's it ! insert and update use an old php4 reference ( public function insert(& data) { ). It's unusefull in php5, isn't it ?


You may be thinking of the ability to explicitly pass by reference at call time.


If not, I believe you are incorrect about the use of references not being useful here and in PHP 5 and in general and would advise you to read the manual section regarding references.


In this particular case, I believe a reference was used for performance reasons so that the call time parameter would not be copied into the actual parameter since it has the potential to be large.

Of course but this removes the availability of quick calls !!

You have to do :

$myarray = array(...);

instead of

insert(array( ... ));

That's not an amazing mistake, just a convenient way pruned !

My two cents ;)

Changing fix version to 0.8.0.

Recategorize as Zend_Db_Table component.

Resolve in revision 3658. Included in ZF 0.9.0.