Closed mjordan closed 7 years ago
@MarcusBarnes I've resolved the conflicts using the nice Github GUI, which is so simple to use that I couldn't figure it out without consulting the documentation.
@mjordan Thank you. I've tested and it appears to work as expected.
Thanks! Branch deleted.
Github issue: (#325)
What does this Pull Request do?
The problem was unnecessary checking of a preg_match()'s $matches within a loop.
In the process of debugging this, I discovered another, unrelated problem: some metadata manipulators throw an exception when the XML snippet they are processing has no length, writing the exception message "DOMDocument::loadXML(): Empty string supplied as input" to the mik.log. By checking for a length on their input and returning the input if the length is 0 we avoid those mik.log entries. With this check in place, the output MODS XML is complete and validates.
What's new?
Unnecessary check on $matches fixed; added check on $input to two other manipulators.
How should this be tested?
Interested parties
@MarcusBarnes
issue-325.zip