Closed (fixed)
Project:
Tax by taxonomy
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Oct 2007 at 12:08 UTC
Updated:
30 Oct 2007 at 17:23 UTC
warning: array_merge() [function.array-merge]: Argument #1 is not an array in .../modules/contrib/tax_by_taxo/tax_by_taxo.module on line 49.
warning: array_merge() [function.array-merge]: Argument #2 is not an array in .../modules/contrib/tax_by_taxo/tax_by_taxo.module on line 49.
warning: Invalid argument supplied for foreach() in .../includes/form.inc on line 948.
begining on line 45:
<? php
if (is_array($regions)) {
foreach($regions as $regid => $region) {
$reg[$region['region_realm'] .'_'. $regid] = $region['region_name'];
}
$locations = array_merge($locations, $reg);
?>
I solved it adding an array initialization:
<? php
if (is_array($regions)) {
foreach($regions as $regid => $region) {
$reg[$region['region_realm'] .'_'. $regid] = $region['region_name'];
}
$locations = array_merge($locations, $reg);
$locations = array_merge($locations, $reg);
?>
Comments
Comment #1
ferriol commentedSorry, I'm not pasted the correct solved code:
Comment #2
robertgarrigos commentedI've applied to dev a simpler solution
Comment #3
(not verified) commented