6.0.0-git
2021-01-18

[#8601] Warnings in current sessions due to missing arguments
Summary Warnings in current sessions due to missing arguments
Queue Horde Base
Queue Version 3.3.5
Type Bug
State Resolved
Priority 1. Low
Owners jan (at) horde (dot) org
Requester moreda (at) allenta (dot) com
Created 2009-09-23 (4135 days ago)
Due
Updated 2009-09-25 (4133 days ago)
Assigned
Resolved 2009-09-25 (4133 days ago)
Milestone 3.3.6
Patch Yes

History
2009-09-25 14:40:31 Jan Schneider Comment #4
Assigned to Jan Schneider
State ⇒ Resolved
Milestone ⇒ 3.3.6
Reply to this comment
Committed, thanks!
2009-09-23 17:20:33 moreda (at) allenta (dot) com Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Summary ⇒ Warnings in current sessions due to missing arguments
Queue ⇒ Horde Base
Milestone ⇒
Patch ⇒ Yes
New Attachment: fix-warning-of-null-values-in-session-handling.diff Download
Reply to this comment
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.


Saved Queries