Missing adodb library message
Status: Pre-Alpha
Brought to you by:
jeffmoore
WACT includes adodb.inc.php and it is always successfull
operation as far as the WACT DB driver has the same name.
The fix:
diff -u -2 -r1.21 adodb.inc.php
--- db/drivers/adodb.inc.php 27 May 2004 22:28:23 -0000
1.21
+++ db/drivers/adodb.inc.php 2 Jun 2004 16:12:59 -0000
@@ -22,5 +22,5 @@
define('ADODB_LIBRARY_PATH', getConfigOption('config',
'adodb', 'library_path'));
}
-if (!@include_once ADODB_LIBRARY_PATH . 'adodb.inc.php') {
+if (ADODB_LIBRARY_PATH === NULL || @include_once
ADODB_LIBRARY_PATH . 'adodb.inc.php') {
RaiseError('runtime', 'LIBRARY_REQUIRED', array(
'library' => 'ADOdb',
Logged In: YES
user_id=569780
Seems we've got a similar problem with other libraries -
we're not checking that a user actually provided a config
value for the path to the library.
Suggest a slightly different implementation where we can
report this as an error e.g.;
if ( !defined('ADODB_LIBRARY_PATH') ) {
define('ADODB_LIBRARY_PATH', getConfigOption('config',
'adodb', 'library_path'));
if ( ADODB_LIBRARY_PATH === NULL ) {
RaiseError('runtime', 'CONFIG_VALUE_REQUIRED', array(
'config_file' => 'config.ini',
'config_section' => 'adodb',
'config_value' => 'library_path'));
}
}
Given more of less the same code it need in each case,
wondering if there's room for a utility function to help?