dmitrirussu / php-sepa-xml-generator

SEPA SDD XML Generator recommended to see. PHP SEPA XML Generator, (Single Euro Payments Area ISO20022 SDD V1_0 20122009) (SEPA)(PHP5)
https://github.com/dmitrirussu/PHP-SEPA-XML-GENERATOR
MIT License
53 stars 36 forks source link

Don't use `unset($this)` #32

Closed PhoneixS closed 6 years ago

PhoneixS commented 6 years ago

I have an error PHP Fatal error: Cannot unset $this in php7.1 with the XMLGenerator because it has a method like:

public function __destruct() {
      unset($this);
}

From the php documentation of unset you can read:

Note:

It is not possible to unset $this inside an object method since PHP 5.

Before php7 it doesn't hurt but now it complains about it. I think it could be removed without problems as $this variable is removed automatically when you go out of context.

dmitrirussu commented 6 years ago

I did an update for that