This is similar (maybe), but not the same as a previous upgrade issue I had encountered ( https://scout.wisc.edu/cwis/forums/troubleshooting/4563 )
I just did a test upgrade of a CWIS site from version 2.4.0 to 3.1.1.
When loading Metadata Field Editor, logging this warning:
PHP Warning: array_key_exists() [<a href='function.array-key-exists'>function.array-key-exists</a>]: The first argument should be either a string or an integer in /htdocs/objects/HumanMetadataField.php on line 1010
Have already removed local EditMetadataField.html and DBEditor.html. Have already set template file cache time to 0.
The DBEditor page used to contain an "Access", back when our permissions system was much simpler and could be succinctly summarized.
We removed most of the interface code for the "Access" when it was no longer useful... The warning you're getting is from a part that we missed in that cleanup.
The attached DBEditor.html removes the problematic sections (which were always hidden via CSS anyway). Please drop this into interface/default; that should fix the issue.
Thank you.
I've replaced the file now with your new file, but unfortunately I am still getting the same error.
Please try the attached updated file.
The warning appears to be gone now; thank you!