PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Logging » Log » Bug #6214

The SQL handler shouldn't depend on DB.php

Details

Request #6214The SQL handler shouldn't depend on DB.php
Submitted2005-12-09 19:50 UTC
Fromo dot persson at gmail dot com
Assignedjon
StatusClosed
PackageLog
PHP Version5.1.0
OSDebian GNU/Linux
Roadmaps(Not assigned)

Comments

[2005-12-09 19:50 UTC] o dot persson at gmail dot com

Description:
------------
I just upgraded Log to 1.9.3 and noticed that I could no longer use it. I believe I must've forgot to report this earlier.

I'm using MDB2's DB-wrapper to be able to use Log with SQL. The problem is that MDB2 defines it's own DB-class, and when SQL requires DB.php it won't work.

Test script:
---------------
--- Log/sql.php (revision 515)
+++ Log/sql.php (working copy)
@@ -8,7 +8,8 @@
*/

/** PEAR's DB package */
-require_once 'DB.php';
+if (!class_exists('DB'))
+ require_once 'DB.php';

/**
* The Log_sql class is a concrete implementation of the Log::

[2006-01-03 21:02 UTC] o dot persson at gmail dot com

Thanks for taking your time to fix this. But sadly, the MDB2's DB-wrapper has been removed a few days ago I just noticed when upgrading. I guess this check isn't needed then. :(