Results 1 to 2 of 2

Thread: problem with DBManagerFactory

  1. #1
    pam81 is offline Member
    Join Date
    Dec 2008
    Posts
    10

    Red face problem with DBManagerFactory

    Hi, I'm using sugar and when I login, I receive this warning:

    Notice: Undefined index: listviews in D:\Apache\htdocs\sugar\include\database\DBManagerF actory.php on line 65

    I can do all without problem but I don't know why I receive this notice.
    I search in the code and in include/listview/listviewdata.php there is the function that call the function that makes the warning

    function ListViewData() {
    $this->limitName = 'list_max_entries_per_page';
    $this->db = &DBManagerFactory::getInstance('listviews');
    }


    this is the function where the warning is happening. include/database/DbManagerFactory.php
    public static function getInstance(
    $instanceName = ''
    )
    {
    global $sugar_config, $dbinstances;
    static $count, $old_count;

    if(isset($instanceName) && $instanceName != ''){
    $config = $sugar_config['db'][$instanceName]; //here is the problem!!

    }else{
    $instanceName = 'db';



    Any idea is welcome !!

    Thanks
    Last edited by pam81; 2009-01-06 at 02:49 PM.

  2. #2
    pam81 is offline Member
    Join Date
    Dec 2008
    Posts
    10

    Default Re: problem with DBManagerFactory

    I can resolve the warning making a chance on config.php

    'db' =>
    array (
    'mysql' =>
    array (
    'db_host_name' => 'localhost',
    'db_host_instance' => 'SQLEXPRESS',
    'db_user_name' => 'root',
    'db_password' => 'xxxxxx',
    'db_name' => 'xxxxx',
    'db_type' => 'mysql',

    ),
    'listviews'=>'', //I put this to stop the warning
    ),

    It's ok? there is a problem with this? I would like to know why is this .

    thanks

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 2005-06-07, 01:42 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •