0

这是警告

   zf2 'Invalid instantiator of type "NULL" for "Zend\Db\Adapter\Profiler\ProfilerInterface"

所以,这是我的 local.config.php,不知何故,适配器希望我使用函数 setProfile 设置配置文件。setProfile 函数位于'Zend\Db\Adapter\Adapter'。我是一个编程的白痴,我不知道如何解决这个问题,我什至不知道它期望什么参数而不是 NULL,我什至不想要一个分析器.....

include (__DIR__ . '/../../vendor/Core/config/function.local.php');

$dbParams = $functionVars['dbParams'];

return array(
  'di' => array(
     'allowed_controllers' => array(
       'Application\Controller\IndexController',
       'Login\Controller\FormController',
       'Login\Controller\RegisterController',
     ),
     'instance' => array(
       'Zend\Db\Adapter\Adapter' => array(
         'parameters' => array(
            'driver' => 'Zend\Db\Adapter\Driver\Pdo\Pdo',
         ),
       ),
       'Zend\Db\Adapter\Driver\Pdo\Pdo' => array(
         'parameters' => array(
            'connection' => 'Zend\Db\Adapter\Driver\Pdo\Connection',
         ),
       ),
       'Zend\Db\Adapter\Driver\Pdo\Connection' => array(
         'parameters' => array(
           'connectionParameters' => array(
             'dsn'            => "mysql:dbname=" . $dbParams['database'] . ";host=" . $dbParams['hostname'],
             'username'       => $dbParams['username'],
             'password'       => $dbParams['password'],
             'driver_options' => array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \'UTF8\''),
           ),
         ),
      ),
    ),
  ),
);
4

0 回答 0