AshishJoshi-asj / zfdebug

Automatically exported from code.google.com/p/zfdebug
Other
0 stars 0 forks source link

Cannot use object of type Zend_Db_Adapter_Pdo_Mysql as array #40

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
zfdebug 1.5 & zend framework 1.10.0

using this code:
    if ($this->hasPluginResource('db')) {
        $this->bootstrap('db');
        $db = $this->getPluginResource('db')->getDbAdapter();
        $options['plugins']['Database']['adapter'] = $db;
    }

produce an error:
Cannot use object of type Zend_Db_Adapter_Pdo_Mysql as array

Original issue reported on code.google.com by sili...@gmail.com on 7 Feb 2010 at 3:32

GoogleCodeExporter commented 9 years ago
I gave the following in my bootstrap which works without any problems.

        $db = $this->getPluginResource('db')->getDbAdapter();
        $zfdebug->registerPlugin(new ZFDebug_Controller_Plugin_Debug_Plugin_Database(array('adapter'=>$db)));

Perhaps this works for you too :)

Cheers
Daan

Original comment by daankint...@gmail.com on 12 Jun 2010 at 8:23