Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When using the module on a PHP7 installation, it fails to install with the following error:
Fatal error: Redefinition of parameter $source in [...]/sites/all/modules/feeds_tamper/plugins/default_value.inc on line 36
Since that parameter is not even used in the function, the obvious solution would just be to remove or rename it.
function feeds_tamper_default_value_callback($source, $item_key, $element_key, &$field, $settings, $source) {
// Setting a default value.
if (!empty($settings['only_if_empty']) && !$field) {
$field = $settings['default_value'];
}
elseif (empty($settings['only_if_empty'])) {
$field = $settings['default_value'];
}
}
Perhaps should be:
function feeds_tamper_default_value_callback($source, $item_key, $element_key, &$field, $settings) {
// Setting a default value.
if (!empty($settings['only_if_empty']) && !$field) {
$field = $settings['default_value'];
}
elseif (empty($settings['only_if_empty'])) {
$field = $settings['default_value'];
}
}
Comment | File | Size | Author |
---|---|---|---|
#3 | module_fails_with_fatal_error-2848365-3.patch | 622 bytes | Znak |
Comments
Comment #2
Znak CreditAttribution: Znak commentedComment #3
Znak CreditAttribution: Znak commentedPatch for this problems. Please, check up
Comment #5
geekygnr CreditAttribution: geekygnr at GiantGoat Web Development Inc. commentedthere is a commit from issue #2567431 that fixes this issue already.
Comment #6
geekygnr CreditAttribution: geekygnr at GiantGoat Web Development Inc. commentedComment #7
geekygnr CreditAttribution: geekygnr at GiantGoat Web Development Inc. commentedComment #8
hairidine CreditAttribution: hairidine as a volunteer and commentedPHP Fatal error: Redefinition of parameter $source in /home/xxxx/git/creativity/creativity/modules/contrib/feeds_tamper/plugins/default_value.inc on line 36