File tree Expand file tree Collapse file tree 1 file changed +19
-12
lines changed Expand file tree Collapse file tree 1 file changed +19
-12
lines changed Original file line number Diff line number Diff line change 11<?php
2-
3- namespace Swaggest \JsonSchema \RemoteRef ;
4-
5- use Swaggest \JsonSchema \RemoteRefProvider ;
6-
7- class BasicFetcher implements RemoteRefProvider
8- {
2+
3+ namespace Swaggest \JsonSchema \RemoteRef ;
4+
5+ use Swaggest \JsonSchema \RemoteRefProvider ;
6+
7+ class BasicFetcher implements RemoteRefProvider
8+ {
99 public function getSchemaData ($ url )
1010 {
11- if ($ data = file_get_contents (rawurldecode ($ url ))) {
12- return json_decode ($ data );
13- }
14- return false ;
11+ $ arrContextOptions = [
12+ "ssl " => [
13+ "verify_peer " => false ,
14+ "verify_peer_name " => false ,
15+ ],
16+ ];
17+
18+ if ($ data = file_get_contents (rawurldecode ($ url ), false , stream_context_create ($ arrContextOptions ))) {
19+ return json_decode ($ data );
20+ }
21+ return false ;
1522 }
16- }
23+ }
You can’t perform that action at this time.
0 commit comments