File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -109,11 +109,18 @@ public function __destruct()
109
109
110
110
private function open (): void
111
111
{
112
- set_error_handler (function ($ type , $ msg ) { throw new TransportException ($ msg ); });
112
+ $ url = $ this ->url ;
113
+
114
+ set_error_handler (function ($ type , $ msg ) use (&$ url ) {
115
+ if (E_NOTICE !== $ type || 'fopen(): Content-type not specified assuming application/x-www-form-urlencoded ' !== $ msg ) {
116
+ throw new TransportException ($ msg );
117
+ }
118
+
119
+ $ this ->logger && $ this ->logger ->info (sprintf ('%s for "%s". ' , $ msg , $ url ?? $ this ->url ));
120
+ });
113
121
114
122
try {
115
123
$ this ->info ['start_time ' ] = microtime (true );
116
- $ url = $ this ->url ;
117
124
118
125
while (true ) {
119
126
$ context = stream_context_get_options ($ this ->context );
You can’t perform that action at this time.
0 commit comments