Issue Type: Bug Created: 2012-03-27T06:10:08.000+0000 Last Updated: 2012-05-24T07:58:58.000+0000 Status: Resolved Fix version(s): Reporter: Chris Schreiber (scribles) Assignee: Ralph Schindler (ralph) Tags: - Zend\Db
Related issues: - ZF2-235
Creating a RowGateway object as a dependency of ResultSet object to set selectResultPrototype property during the construction of a TableGateway object causes the following error:
"Fatal error: __clone method called on non-object in /var/www/pyratepunx/vendor/ZendFramework/library/Zend/Db/TableGateway/TableGateway.php on line 382"
The problem is the RowGateway constructor tries to clone the TableGateway object which tries to clone its selectResultPrototype property which is what we are trying to set and it creates a bit of a chicken and the egg situation.
The following code reproduces the error:selectResultPrototype = new \\Zend\\Db\\ResultSet\\ResultSet(new MyRowGateway($this, 'id')); } } $myTable = new MyTableGateway(); ?>
Posted by Vitalii (duken) (duken) on 2012-03-27T06:57:24.000+0000
It's the same. And I guess that patch resolve and this.
Posted by Vitalii (duken) (duken) on 2012-05-24T07:58:58.000+0000
Fixed in beta4
Have you found an issue?
See the Overview section for more details.