Skip to content

Commit

Permalink
Fix error default value for pam functions
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed Aug 26, 2024
1 parent 640e800 commit 6a59457
Showing 1 changed file with 4 additions and 4 deletions.
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') {}

0 comments on commit 6a59457

Please sign in to comment.