In 3.4.0 a validation of "period" fied of user Media was added.
Before, it was allowed to have
in 3.4.0 this field validation was added, disallowing trailing semicolon
So the script to add user media could stop working after migrating to 3.4. There seems to be no mention of that in API changes
or upgrade notes (if that is related at all). FYI, the server upgrade patch works as it should, removing the trailing semicolon.