nategood / httpful

A Chainable, REST Friendly, PHP HTTP Client. A sane alternative to cURL.
MIT License
1.74k stars 299 forks source link

Templating broken with unset #306

Open sosherof opened 7 months ago

sosherof commented 7 months ago

Requests had a statement, at the end of the send method, to unset($this->_ch). $_ch holds the curl object. Under PHP 8.x, accessing/setting undefined class properties throws a warning. So when using the template abilities, subsequent send operations would generate a warning. The fix was to set $this->_ch = null;.