This is a bug in Joomla. We've reported it, but they won't fix it. When you try updating different Joomla! extension types at the same time, Joomla! bugs out in subtle ways which undermine the extension update reliability.
For example, do not update a Library extension and a Package extension at the same time. This is what you did.
The reason is a bit technical and has to do with Joomla creating only one updater object, for the first extension it needs to update (in your case: the library), then reusing it even if the extension being updated is of a different type. This causes all sorts of problems, including calling the pre-installation script with the wrong arguments, triggering a PHP error – that's what you have.
Solution: Always update each extension individually.
Nicholas K. Dionysopoulos
Lead Developer and Director
🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!