6.0.0-RC7
6/27/26

[#5878] Horde_Cache sql.php driver does not default to correct table name
Summary Horde_Cache sql.php driver does not default to correct table name
Queue Horde Framework Packages
Queue Version HEAD
Type Bug
State Resolved
Priority 1. Low
Owners chuck (at) horde (dot) org
Requester brandon.s.ramirez (at) gmail (dot) com
Created 11/11/07 (6803 days ago)
Due
Updated 11/11/07 (6803 days ago)
Assigned 11/11/07 (6803 days ago)
Resolved 11/11/07 (6803 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
3011 Chuck Hagenbuch Comment #2
Assigned to Chuck Hagenbuch
Taken from Michael Slusarz
State ⇒ Resolved
Reply to this comment
Fixed in CVS (our convention is to make sure the object's params array 
contains the correct values, rather than checking on every use).
811 Chuck Hagenbuch Deleted Original Message
 
2410 Jan Schneider State ⇒ Assigned
Assigned to Michael Slusarz
 
3912 brandon (dot) s (dot) ramirez (at) gmail (dot) com Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Horde_Cache sql.php driver does not default to correct table name
Queue ⇒ Horde Framework Packages
New Attachment: Horde_Cache_sql.php.diff
State ⇒ Unconfirmed
Reply to this comment
The UI for the Horde configuration's 'Cache' tab renders the 'table' 
parameter as optional and in brackets specifies a default value of 
'horde_cache' for the table name.  However, if you configure the 
Horde_Cache_sql driver without a table name, a PHP notice is displayed 
on the sidebar multiple times specifying that the key 'table' is 
missing.



I traced the problem to the 'framework/Cache/Cache/sql.php' file on 
lines 144 and 186 where it builds the SQL queries using 
$this->_params['table'].



To make the driver properly default to 'horde_table', I added an 
in-line conditional into both lines and created a patch for the file.



See attached.



Versions affected:

HEAD snapshot of 'framework' on 11-05-07.  The CVS browser says the 
file was last modified 6 months ago, however, so the issue should 
still apply.



Steps to reproduce:

1. Configure Horde to use the 'SQL' driver for caching.

2. Leave the table name blank (even if the horde_cache table exists in 
your DB)

3. Logout

4. Log back in

5. Look at sidebar

Saved Queries