However, STDERR is only available in CLI environments. Additionally, curl_setopt($ch, CURLINFO_HEADER_OUT, $value) expects $value to be boolean. It would have worked in CLI since the stream returned by STDERR would evaluate to true, but it fails in non-CLI environments.
Instead, defined("STDERR") seems to be what was intended. But it could also be skipped if $this->debugMode is not true. So, I would recommend:
if ($this->debugMode && defined("STDERR"))
curl_setopt($ch, CURLINFO_HEADER_OUT, true);
I've updated to the latest version and started receiving this notice:
It was introduced with this commit.
However,
STDERR
is only available in CLI environments. Additionally,curl_setopt($ch, CURLINFO_HEADER_OUT, $value)
expects$value
to be boolean. It would have worked in CLI since the stream returned by STDERR would evaluate totrue
, but it fails in non-CLI environments.Instead,
defined("STDERR")
seems to be what was intended. But it could also be skipped if$this->debugMode
is nottrue
. So, I would recommend: