[Tickets #9164] PHP 5 + Turba + Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /var/www/html/horde/turba/config/sources.php on line 123

bugs at horde.org bugs at horde.org
Tue Aug 3 08:07:18 UTC 2010


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/9164
------------------------------------------------------------------------------
  Ticket             | 9164
  Created By         | ccto at website-solution.net
  Summary            | PHP 5 + Turba + Warning: array_merge()
                     | [function.array-merge]: Argument #1 is not an array in
                     | /var/www/html/horde/turba/config/sources.php on line
                     | 123
  Queue              | Turba
  Version            | 2.3.4
  Type               | Bug
  State              | Unconfirmed
  Priority           | 2. Medium
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


ccto at website-solution.net (2010-08-03 04:07) wrote:

Hello Horde/Turba Team.

Under PHP 5 (5.2.14) environment, when users (or admin) login , it  
will raise the following message -

Warning: array_merge() [function.array-merge]: Argument #1 is not an  
array in /var/www/html/horde/turba/config/sources.php on line 123

However, in PHP 4 (4.4.9) environment , it does not raise the above message.

--------

We found that under ./turba/lib/api.php , the function  
_turba_listTimeObjectCategories()
function _turba_listTimeObjectCategories()
{
     include dirname(__FILE__) . '/../config/attributes.php';
     $categories = array();
     include dirname(__FILE__) . '/../config/sources.php';
     foreach ($attributes as $key => $attribute) {
         if ($attribute['type'] == 'monthdayyear' &&
             !empty($attribute['time_object_label'])) {

             foreach ($cfgSources as $source) {
                 if (!empty($source['map'][$key])) {
                     $categories[$key] = $attribute['time_object_label'];
                     break;
                 }
             }
         }
     }



     return $categories;
}

when calling to sources.php to get the map, the $conf[ 'sql' ] array  
SHOULD already be unset and cause the empty/NULL array to be merged  
warning message under PHP 5.

Please help.

Thank you for your kind attention.
Regards
Geogre






More information about the bugs mailing list