svn: /web/doc-editor/trunk/php/ AccountManager.php

[email protected] (Yannick Torres)
Newsgroups php.doc.web
Message-ID <[email protected]>
yannick                                  Sat, 23 Jul 2011 09:27:15 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=313626

Log:
Fix bug when this is an anymous user to enter into this function

Changed paths:
    U   web/doc-editor/trunk/php/AccountManager.php

Modified: web/doc-editor/trunk/php/AccountManager.php
===================================================================
--- web/doc-editor/trunk/php/AccountManager.php	2011-07-23 09:02:07 UTC (rev 313625)
+++ web/doc-editor/trunk/php/AccountManager.php	2011-07-23 09:27:15 UTC (rev 313626)
@@ -491,10 +491,12 @@
         $params = array($this->project, $userLogin, $anonymousIdent);
         $r = $this->conn->query($s, $params);
         $a = $r->fetch_object();
+
+        // An anonymous have is #xxx at the end of his login. So, the sql "failed"
+        if( !is_object($a) ) {
+            return true;
+        }

-        // We have a warn in production here
-        debug("In AccountManager ; In anonymous() method ; userLogin=".$userLogin."; anonymousIdent=".$anonymousIdent.";");
-
         return ( $a->authService == 'VCS' && $a->anonymousIdent == '' ) ? false : true;
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.