6.0.0-beta1
9/24/25

[#3312] Problem with latest changes to History.php
Summary Problem with latest changes to History.php
Queue Horde Framework Packages
Queue Version FRAMEWORK_3
Type Bug
State Not A Bug
Priority 2. Medium
Owners ben (at)
Requester eric.rostetter (at) physics (dot) utexas (dot) edu
Created 01/20/2006 (7187 days ago)
Due
Updated 01/24/2006 (7183 days ago)
Assigned 01/21/2006 (7186 days ago)
Resolved 01/24/2006 (7183 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
01/24/2006 09:14:56 PM Eric Rostetter Comment #6
State ⇒ Not A Bug
Reply to this comment
I put the original code back (but leaving my error checking, which 
should probably be

done in any case; always check for and handle any possible errors, 
right?)  and

I'm not seeing any more errors being logged, so either this was bogus 
to start with

or something else changed and fixed it.  Closing this case for now.
01/23/2006 11:44:21 PM ben Comment #5 Reply to this comment
Out of curiosity, what does your $conf['sql'] look like at that point?
01/23/2006 07:05:45 PM Eric Rostetter Comment #4 Reply to this comment
I've updated my patch as:



59a60,62
         if (is_a($this->_db, 'PEAR_Error')) {
             Horde::fatal($this->_db, __FILE__, __LINE__);
         }
62c65

<         switch ($this->_db->phptype) {

---
         switch ($conf['sql']->phptype) {
01/23/2006 06:28:08 PM Eric Rostetter Comment #3 Reply to this comment
The line:



switch ($this->_db->phptype) {



gave the error:



Jan 20 14:16:00 web2 httpd: PHP Notice:  Undefined property:  phptype 
in /usr/share/pear/Horde/History.php on line 62



switching it to:



switch ($conf['sql']->phptype) {



Solved it for me.  If this isn't correct, then I've got a big problem 
somewhere.  But since

it only affects this one file after your recent changes, I was betting 
it was a mistake.


01/21/2006 06:43:34 AM ben Comment #2
State ⇒ Feedback
Reply to this comment
What kind of problems are you having?  I'm guessing your DB connection 
fails, giving you a non-object type error?



The code assumes that the DB connection was successful. But, it did 
before I touched it, too, which makes it hard for me to believe that 
you were not having problems beforehand.
01/20/2006 11:22:00 PM Chuck Hagenbuch Assigned to ben
State ⇒ Assigned
 
01/20/2006 08:52:46 PM Eric Rostetter Comment #1
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ Problem with latest changes to History.php
Queue ⇒ Horde Framework Packages
State ⇒ Unconfirmed
Reply to this comment
I was having problems with the History.php due to the recent changes

for mssql support.  The following far from perfect patch removed my

symptoms/problems.



RCS file: /repository/framework/History/History.php,v

retrieving revision 1.28.2.9

diff -r1.28.2.9 History.php

59a60
         if ( DB::isError($this->_db) ) die("ARG!");
62c63

<         switch ($this->_db->phptype) {

---
         switch ($conf['sql']->phptype) {

Saved Queries