[dev] Re: passwd, pass-by-reference?
Eric Rostetter
eric.rostetter@physics.utexas.edu
Tue, 13 Aug 2002 11:21:01 -0500
Quoting Leena Heino <Leena.Heino@uta.fi>:
> Why these variables must be passed by reference? It causes quite a few
> error messages?
Can someone confirm that similar_text() no longer needs the third
argument passed by reference? When I looked up the fsockopen (where I
earlier got a complaint about needlessly using reference arguemnts) I see
that docs do indeed say it is no longer needed. But I see no such
info for similar_text(). Both my manual and the on-line refernence say
"pass the percent by reference" or "By passing a reference as third argument"
or similar.
> --- passwd/main.php.orig Mon Aug 12 16:15:01 2002
> +++ passwd/main.php Mon Aug 12 16:15:33 2002
> @@ -71,8 +71,8 @@
> }
> // check for percentages similarity also. This will catch very
> simple
> // things like "password" -> "password2" or "xpasssword"...
> - @similar_text($newpassword0, $oldpassword, &$percent1);
> - @similar_text($newpassword0, $userid, &$percent2);
> + @similar_text($newpassword0, $oldpassword, $percent1);
> + @similar_text($newpassword0, $userid, $percent2);
> if ( ($percent1 > 80) || ($percent2 > 80) ) {
> Horde::raiseMessage(_("Your new password is too simple to guess!
> Not changed!"),HORDE_WARNING);
> $error = true;
>
>
> --
> -- Leena Heino (liinu at uta.fi)
--
Eric Rostetter
The Department of Physics
The University of Texas at Austin
"TAD (Technology Attachment Disorder) is an unshakable, impractical devotion
to a brand, platform, product line, or programming language. It's relatively
harmless among the rank and file, but when management is afflicted the damage
can be measured in dollars. It's also contagious -- someone with sufficient
political clout can infect an entire organization."
--"Enterprise Strategies" columnist Tom Yager.