Skip to content

Commit

Permalink
Update GithubUpdater.php
Browse files Browse the repository at this point in the history
Temp fix to fix error that may occur if the PHP installation on the server doesn't have access to the system's temporary directory or the necessary permissions to create files in it.
  • Loading branch information
zackpyle authored Aug 24, 2023
1 parent 1b6b016 commit 22d7c94
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion includes/updater/GithubUpdater.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ public function modify_transient( $transient ) {
*/
private function get_tmpfile_data( $string ) {

$temp = tmpfile();
$temp_file = wp_tempnam();
$temp = fopen($temp_file, 'r+');
$tmpfilename = stream_get_meta_data($temp)['uri'];
fwrite( $temp, $string);

Expand Down

0 comments on commit 22d7c94

Please sign in to comment.