Skip to content

Commit

Permalink
Fix problem with posix_getpwuid on Windows PHP 8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon committed Nov 17, 2022
1 parent 79aeb24 commit 1232110
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ShortPixelWeb.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

class ShortPixelWeb
{
const VERSION = "1.4.2";
const VERSION = "1.4.3";
const LOG_PRODUCERS = SPLog::PRODUCER_NONE; //SPLog::PRODUCER_WEB | SPLog::PRODUCER_PERSISTER | SPLog::PRODUCER_CLIENT | SPLog::PRODUCER_RESULT | SPLog::PRODUCER_CTRL;

private $settingsHandler;
Expand Down Expand Up @@ -236,7 +236,7 @@ function renderSettings($type) {

function initJSConstants($optData = array()) {
$username = '[WEB SERVER USER]';
if(function_exists('posix_geteuid')) {
if(function_exists('posix_geteuid') && function_exists('posix_getpwuid')) {
$pwu_data = posix_getpwuid(posix_geteuid());
$username = $pwu_data['name'];
}
Expand Down

0 comments on commit 1232110

Please sign in to comment.