I use a money field in a content type that i want to share on another content type but when i add existing money field, i have got some warning, this is the code which cause the problem :
$allowed_currencies = array_keys(array_filter($widget['allowed_currencies']));
$allowed_currencies = array_combine($allowed_currencies, $allowed_currencies);
And i fixed the bug with this code :
if (isset($widget['allowed_currencies']) && is_array($widget['allowed_currencies'])) {
// Get filtered array
$allowed_currencies = array_filter($widget['allowed_currencies']);
// If not empty, create array for form elements
if (!(empty($allowed_currencies))) {
$allowed_currencies = array_keys($allowed_currencies);
$allowed_currencies = array_combine($allowed_currencies, $allowed_currencies);
}
}
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | money-428208.patch | 1.18 KB | markus_petrux |
Comments
Comment #1
markus_petrux commentedOh, I see. Thanks for the report. Changing title to reflect the warning issued by PHP in this case. Fixed in CVS.