Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.6.4

Bug #5174 Notice: Only variable references should be returned by reference
Submitted: 2005-08-22 04:06 UTC Modified: 2006-01-08 07:31 UTC
From: morpheu5 at infinito dot it Assigned: lsmith
Status: Closed Package: Auth
PHP Version: 5.1.0 OS: Windows XP
Roadmaps: (Not assigned)    
Subscription  


 [2005-08-22 04:06 UTC] morpheu5 at infinito dot it
Description: ------------ Auth-1.3.0r3. Running the scripts included in the Documentation/Introduction I get the following notice: Notice: Only variable references should be returned by reference in c:\Programmi\php\PEAR\Auth.php on line 344 The script works fine made exception for this boring notice. I haven't been able to fix Auth.php by myself, I'm still trying to do that but I'm not a so experienced php-coder. Thanks for your support. Test script: --------------- http://pear.php.net/manual/en/package.authentication.auth.intro.php Expected result: ---------------- Just the login form. Actual result: -------------- That horrible notice AND the login form.

Comments

 [2005-08-22 04:18 UTC] morpheu5 at infinito dot it
I actually don't know if this solves the problem but the notice has magically disappeared itself. In file Auth.php at line 344: - return new $storage_class($options); + $result = new $storage_class($options); + return $result; Et voilĂ . It seems that everything is working correctly, the authentication process works. Cheers :)
 [2005-12-14 18:44 UTC] csyntax
This fixes it: -------------- function &_factory($driver, $options = '') { $storage_class = 'Auth_Container_' . $driver; require_once('Auth/Container/' . $driver . '.php'); // workaround php 4.4.0 rules: $tmp =& new $storage_class($options); return $tmp; }
 [2006-01-08 07:31 UTC] lsmith
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.