File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
src/PhpSpreadsheet/Reader/Security
tests/PhpSpreadsheetTests/Reader/Security Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ public function scan($xml)
101101 $ xml = call_user_func ($ this ->callback , $ xml );
102102 }
103103 } finally {
104- if ($ this -> libxmlDisableEntityLoader ) {
104+ if (isset ( $ previousLibxmlDisableEntityLoaderValue ) ) {
105105 libxml_disable_entity_loader ($ previousLibxmlDisableEntityLoaderValue );
106106 }
107107 }
Original file line number Diff line number Diff line change @@ -119,15 +119,15 @@ public function providerValidXMLForCallback()
119119 /**
120120 * @dataProvider providerLibxmlSettings
121121 *
122- * @param $libxmDisableLoader
122+ * @param $libxmlDisableLoader
123123 */
124- public function testNewInstanceCreationDoesntChangeLibxmlSettings ($ libxmDisableLoader )
124+ public function testNewInstanceCreationDoesntChangeLibxmlSettings ($ libxmlDisableLoader )
125125 {
126- libxml_disable_entity_loader ($ libxmDisableLoader );
126+ libxml_disable_entity_loader ($ libxmlDisableLoader );
127127
128128 $ reader = new Xml ();
129-
130- self :: assertEquals ( $ libxmDisableLoader , libxml_disable_entity_loader ( $ libxmDisableLoader ) );
129+ self :: assertEquals ( $ libxmlDisableLoader , libxml_disable_entity_loader ( $ libxmlDisableLoader ));
130+ unset( $ reader );
131131 }
132132
133133 public function providerLibxmlSettings ()
You can’t perform that action at this time.
0 commit comments