Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error default value for pam functions #1657

Merged
merged 1 commit into from
Aug 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pam/pam.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* @param string $password <p>
* The user-supplied password to check.
* </p>
* @param string $error <p>
* @param string|null &$error <p>
* Output parameter to put any error messages in.
* </p>
* @param bool $check_account_management <p>
Expand All @@ -23,7 +23,7 @@
* @return bool Returns a bool when complete. If false, <b>$error</b> contains any error messages generated.
*/
#[Pure]
function pam_auth(string $username, string $password, string $error, bool $check_account_management = true, string $service_name = 'php') {}
function pam_auth(string $username, string $password, ?string &$error = null, bool $check_account_management = true, string $service_name = 'php') {}

/**
* Change a password for a PAM unix account.
Expand All @@ -37,7 +37,7 @@ function pam_auth(string $username, string $password, string $error, bool $check
* @param string $new_password <p>
* The new password for the account.
* </p>
* @param string $error <p>
* @param string|null &$error <p>
* Output parameter to put any error messages in.
* </p>
* @param string $service_name <p>
Expand All @@ -46,4 +46,4 @@ function pam_auth(string $username, string $password, string $error, bool $check
* @return bool Returns a bool when complete. If false, <b>$error</b> contains any error messages generated.
*/
#[Pure]
function pam_chpass(string $username, string $old_password, string $new_password, string $error, string $service_name = 'php') {}
function pam_chpass(string $username, string $old_password, string $new_password, string &$error = null, string $service_name = 'php') {}
Loading