Web lists-archives.com

Re: [PHP] pass-by-reference Error (old server)

On 12.07.2016 at 16:28, Shaun Morrow wrote:

> 252:      if (pam_auth($_POST['user'], $_POST['pass'], &$PAM_ERR)) {
> Should become:
> 252:      if (pam_auth($_POST['user'], $_POST['pass'], $PAM_ERR)) {
> Looks like its pam_auth is a PHP extension, don't know much about it, found
> the source code (http://svn.php.net/viewvc/pecl/pam/trunk/) and it looks
> like the 3rd parameter is pass by reference.
> I would hazard a guess and say, remove the ampersand from line 252 and it
> will work.

Yes, that is supposed to work.  See also the note in
<http://php.net/manual/en/language.references.pass.php>, and the
relevant migration guides on <http://php.net/manual/en/appendices.php>.

Christoph M. Becker

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php