Update extension.php

Added check whether $this->currentUpdate is set which produces a notice when error reporting is on that prevents the JSON response from the script from being interpreted by the control panel module.
https://github.com/joomla/joomla-cms/issues/3631