[dev] Minor issue regarding SessionHandler/pgsql.php

Alan Garrison alang at cronosys.com
Tue Aug 3 12:57:25 PDT 2004


The _connect() method does an if check on $tcp_protocol though it is 
never set, generating a Notice level message.  The current CVS version 
(1.11) doesn't set $tcp_protocol anywhere, though doing a diff between 
that version and a few versions back yields:


<<<<<<< pgsql.php
             if (!is_array($this->_params)) {
                 Horde::fatal(PEAR::raiseError(_("No configuration 
information specified for SQL SessionHandler.")), __FILE__, __LINE__);
             }

             $tcp_protocol = (isset($this->_params['protocol']) && 
($this->_params['protocol'] == 'tcp'));
             $check = array('database', 'password', 'protocol', 'username');
             if ($tcp_protocol) {
                 $check += array('hostspec', 'port');
             }

             foreach ($check as $val) {
                 if (!isset($this->_params[$val])) {
                     Horde::fatal(PEAR::raiseError(sprintf(_("Required 
'%s' not specified in SessionHandler configuration."), $val)), __FILE__, 
__LINE__);
                 }
             }

             if (empty($this->_params['table'])) {
=======

I presume the variable should be set, else it may assume a 'unix' 
connection (maybe?).

-- 
Alan Garrison
Cronosys, LLC <http://www.cronosys.com>



More information about the dev mailing list