Re: pass-by-reference Error (old server)
| From: | Christoph Becker | Date: | Tue, 12 Jul 2016 15:07:29 +0000 |
| Subject: | Re: pass-by-reference Error (old server) | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-325644@lists.php.net to get a copy of this message | ||
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