Skip to content

Commit c6d7615

Browse files
committed
Fix deprecation warnings
1 parent b5d4205 commit c6d7615

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

XML_Parser.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ function free()
564564
function raiseError($msg = null, $ecode = 0)
565565
{
566566
$msg = !is_null($msg) ? $msg : $this->parser;
567-
$err = &new XML_Parser_Error($msg, $ecode);
567+
$err = new XML_Parser_Error($msg, $ecode);
568568
return parent::raiseError($err);
569569
}
570570

XML_Unserializer.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -686,9 +686,9 @@ function endHandler($parser, $element)
686686
}
687687
// instantiate the class
688688
if ($this->options[XML_UNSERIALIZER_OPTION_TAG_AS_CLASSNAME] === true && class_exists($classname)) {
689-
$value['value'] = &new $classname;
689+
$value['value'] = new $classname;
690690
} else {
691-
$value['value'] = &new $this->options[XML_UNSERIALIZER_OPTION_DEFAULT_CLASS];
691+
$value['value'] = new $this->options[XML_UNSERIALIZER_OPTION_DEFAULT_CLASS];
692692
}
693693
if (trim($data) !== '') {
694694
if ($value['guessType'] === true) {
@@ -847,7 +847,7 @@ function _createParser()
847847
$this->_parser->free();
848848
unset($this->_parser);
849849
}
850-
$this->_parser = &new XML_Parser($this->options[XML_UNSERIALIZER_OPTION_ENCODING_SOURCE], 'event', $this->options[XML_UNSERIALIZER_OPTION_ENCODING_TARGET]);
850+
$this->_parser = new XML_Parser($this->options[XML_UNSERIALIZER_OPTION_ENCODING_SOURCE], 'event', $this->options[XML_UNSERIALIZER_OPTION_ENCODING_TARGET]);
851851
$this->_parser->folding = false;
852852
$this->_parser->setHandlerObj($this);
853853
return true;

0 commit comments

Comments
 (0)