Skip to content
Snippets Groups Projects

Undefined array key map_false fixed

1 unresolved thread

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
44 44 */
45 45 public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
46 46 $map_false = ['false', 'FALSE', 'null', 'NULL', '0'];
47 $map_false_from_config = (!empty($this->configuration['map_false'] && is_array($this->configuration['map_false']))) ? $this->configuration['map_false'] : [];
47 $map_false_from_config = (isset($this->configuration['map_false']) && !empty($this->configuration['map_false'] && is_array($this->configuration['map_false']))) ? $this->configuration['map_false'] : [];
  • I don't think we need the !empty() on this since we are passing an empty array if it is. It would read better if it was just (isset($this->configuration['map_false']) && is_array($this->configuration['map_false']))

    Same for $map_true_from_config..

  • Please register or sign in to reply
Please register or sign in to reply
Loading