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 |
Queue Version | 2.3.4 |
Type | Bug |
State | Resolved |
Priority | 2. Medium |
Owners | mrubinsk (at) horde (dot) org |
Requester | ccto (at) website-solution (dot) net |
Created | 08/03/2010 (5456 days ago) |
Due | |
Updated | 09/13/2010 (5415 days ago) |
Assigned | |
Resolved | 08/03/2010 (5456 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
Assigned to Michael Rubinsky
State ⇒ Resolved
Make sure all needed configuration is present when calling
listTimeObjectCategories.
Fixes
Bug #9164http://cvs.horde.org/diff.php/turba/lib/api.php?rt=horde&r1=1.120.2.70&r2=1.120.2.71&ty=u
Priority ⇒ 2. Medium
Patch ⇒ No
Milestone ⇒
Queue ⇒ Turba
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
Type ⇒ Bug
State ⇒ Unconfirmed
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
#1is not anarray 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