File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ public function update()
7676 $ this ->withTemporaryDirectory (function ($ directory ) {
7777 $ tarFile = sprintf ('%s/maxmind.tar.gz ' , $ directory );
7878
79- file_put_contents ($ tarFile , fopen ($ this ->config ('update_url ' ), 'r ' ));
79+ file_put_contents ($ tarFile , fopen ($ this ->config ('update_url ' ), 'rb ' ));
8080
8181 $ archive = new PharData ($ tarFile );
8282
@@ -86,7 +86,7 @@ public function update()
8686
8787 $ archive ->extractTo ($ directory , $ relativePath );
8888
89- file_put_contents ($ this ->config ('database_path ' ), fopen ("{$ directory }/ {$ relativePath }" , 'r ' ));
89+ file_put_contents ($ this ->config ('database_path ' ), fopen ("{$ directory }/ {$ relativePath }" , 'rb ' ));
9090 });
9191
9292 return "Database file ( {$ this ->config ('database_path ' )}) updated. " ;
@@ -134,7 +134,7 @@ protected function findDatabaseFile($archive)
134134 return $ this ->findDatabaseFile (new PharData ($ file ->getPathName ()));
135135 }
136136
137- if (pathinfo ($ file , PATHINFO_EXTENSION ) === 'mmdb ' ) {
137+ if (pathinfo ($ file , \ PATHINFO_EXTENSION ) === 'mmdb ' ) {
138138 return $ file ;
139139 }
140140 }
You can’t perform that action at this time.
0 commit comments