Skip to content

Commit

Permalink
Prevent a PHP warning
Browse files Browse the repository at this point in the history
* content variable is reset to all execution, actually we don't load previous file content
  • Loading branch information
camlafit committed Nov 13, 2024
1 parent c81eac3 commit 3a23d27
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/usr/share/alternc/panel/class/m_nss.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,24 +87,21 @@ public function update_files()
protected function update_group_file()
{
$file = "/var/lib/extrausers/group";
// $content = file_get_contents($file);
$content .= $this->group_file;
$content = $this->group_file;
return file_put_contents($file, $content, LOCK_EX);
}

protected function update_passwd_file()
{
$file = "/var/lib/extrausers/passwd";
// $content = file_get_contents($file);
$content .= $this->passwd_file;
$content = $this->passwd_file;
return file_put_contents($file, $content, LOCK_EX);
}

protected function update_shadow_file()
{
$file = "/var/lib/extrausers/shadow";
// $content = file_get_contents($file);
$content .= $this->shadow_file;
$content = $this->shadow_file;
return file_put_contents($file, $content, LOCK_EX);
}

Expand Down

0 comments on commit 3a23d27

Please sign in to comment.