1

As per the title - this message was observed first during an import, which failed. I re-imported with a 'tracker' field so i could see exactly where it failed. And rinsed and repeated. Found 2 records in import that were tripping it up. When trying to visit those records in civicrm i got same error, and with backtrace got

/sites/all/modules/civicrm/CRM/Utils/Type.php(362): CRM_Core_Error::fatal("One of parameters (value: Array) is not of the type Integer")

but does that help identify the culprit data?

2 Answers 2

2

Ok - so stroke of luck - was checking the Contact table and spotted that one of my problem patients had 'array' in the Preferred Communications table, as did the other record which the import failed on. As did about another dozen.

Once I changed the value in the db i could then visit the record.

Which I guess poses another question of how did they get array in as the value and I may post that as a separate question.

7
  • Something that happens occasionally with Excel CSV files, particularly if they‘ve also been edited by hand is that they get their ,,,,,,s confused along with its ""s. So I bet that the value that you wanted got uploaded as ""100,"" or "100," not just "100", which would explain why it was interpreted as an array. #Theory
    – JohnFF
    Commented Mar 21, 2016 at 1:38
  • nope - maybe haven't explained well enough - data that is borked on the contact record is not part of the import - the contacts data was corrupted in that field pre-import somehow - so it may possibly been a result of an earlier import but civi should prevent incorrect data being uploaded
    – petednz - fuzion
    Commented Mar 21, 2016 at 2:24
  • so yes you could be exactly right, ie that their Comms Prefs were imported as you say, with a comma, some time in the past - not sure i can check beyond looking in logs but those records only had 'array' in their histories. i guess the old import upload files may be on their site too. not sure if they can be bothered with more digging ;-)
    – petednz - fuzion
    Commented Mar 21, 2016 at 5:43
  • Definitely look in logs. And I wish I‘d have added this as an answer for points :(
    – JohnFF
    Commented Mar 21, 2016 at 11:41
  • you still can ;-)
    – petednz - fuzion
    Commented Mar 21, 2016 at 20:36
1

Something that happens occasionally with Excel CSV files, particularly if they‘ve also been edited by hand is that they get their ,,,,,,s confused along with its ""s. So I bet that the value that you wanted got uploaded as ""100,"" or "100," not just "100", which would explain why it was interpreted as an array. #Theory

Definitely look in logs.

To answer more comments in the previous thread:

echo $array results in the word Array being output, so it wouldn't surprise me if there were other bits of PHP that do the same. Parts may even call the echo function frankly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.