[Tickets #8601] Re: Warnings in current sessions due to missing arguments

bugs at horde.org bugs at horde.org
Thu Sep 24 08:12:35 UTC 2009


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/8601
------------------------------------------------------------------------------
  Ticket             | 8601
  Updated By         | rafael.varela at usc.es
  Summary            | Warnings in current sessions due to missing arguments
  Queue              | Horde Base
  Version            | 3.3.5
  Type               | Bug
  State              | Unconfirmed
  Priority           | 1. Low
  Milestone          |
  Patch              | 1
  Owners             |
------------------------------------------------------------------------------


moreda at allenta.com (2009-09-23 13:20) wrote:

Using MSSQL as storage for sessions through PEAR's DB abstraction  
layer I found this type of messages in the "current sessions" screen:

Warning: Missing argument 1 for SessionHandler::open(), called in  
/usr/local/share/horde-3.3.5/lib/Horde/SessionHandler/sql.php on line  
307 and defined in  
/usr/local/share/horde-3.3.5/lib/Horde/SessionHandler.php on line 149

Warning: Missing argument 2 for SessionHandler::open(), called in  
/usr/local/share/horde-3.3.5/lib/Horde/SessionHandler/sql.php on line  
307 and defined in  
/usr/local/share/horde-3.3.5/lib/Horde/SessionHandler.php on line 149

Notice: Undefined variable: save_path in  
/usr/local/share/horde-3.3.5/lib/Horde/SessionHandler.php on line 155

Notice: Undefined variable: session_name in  
/usr/local/share/horde-3.3.5/lib/Horde/SessionHandler.php on line 155

These messages are derived from the lack of default null values for  
the arguments of the function open() in lib/Horde/SessionHandler.php  
(or maybe an incorrect use of this function from some other parts of  
the code).

In any case makes sense for me to apply this:

--- horde-3.3.5.orig/lib/Horde/SessionHandler.php       2009-09-23  
17:59:12.206783858 +0200
+++ horde-3.3.5/lib/Horde/SessionHandler.php    2009-09-23  
18:16:05.402784153 +0200
@@ -146,7 +146,7 @@
       *
       * @return boolean  True on success, false otherwise.
       */
-    function open($save_path, $session_name)
+    function open($save_path = null, $session_name = null)
      {
          if ($this->_connected) {
              return true;

See trivial patch attached.







More information about the bugs mailing list