SVGReader.php: Reduce code duplication by using finally {}

Change-Id: I916171216dc96b46120d11b492f14b8d791c1b3c
This commit is contained in:
Reedy 2021-01-31 02:21:39 +00:00 committed by Jforrester
parent 03c66d2141
commit d7decde5f5

View file

@ -101,12 +101,11 @@ class SVGReader {
} catch ( Exception $e ) {
// Note, if this happens, the width/height will be taken to be 0x0.
// Should we consider it the default 512x512 instead?
throw $e;
} finally {
Wikimedia\restoreWarnings();
libxml_disable_entity_loader( $oldDisable );
throw $e;
}
Wikimedia\restoreWarnings();
libxml_disable_entity_loader( $oldDisable );
}
/**