Issue Type: Bug Created: 2012-03-27T06:53:49.000+0000 Last Updated: 2012-03-27T07:00:49.000+0000 Status: Resolved Fix version(s): Reporter: Vitalii (duken) (duken) Assignee: Vitalii (duken) (duken) Tags: - Zend\Db
Related issues: Attachments:
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-27T07:00:49.000+0000
I want created duplicate issuen Instead clone bug (.
Have you found an issue?
See the Overview section for more details.