Re: PEAR DB Error??
| From: | Graham Clarke | Date: | Tue, 22 Jul 2003 19:08:52 +0000 |
| Subject: | Re: PEAR DB Error?? | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-6729@lists.php.net to get a copy of this message | ||
Turns out this was caused by incorrect use of QuickForm loaddbResult(). The inclusion of the default value --> $user_id <--- in createElement() is the culprit. It conflicts with loaddbResult() and produces the E_WARNING described. Once removed, the error went away
// user select widget
$selects['users'] =& $roleForm->createElement('select', 'user_id', 'User' , --> $user_id <--);
$selects['users']->addOption('-- Select a User', 0);
$selects['users']->loaddbResult($users, 'name', 'user_id', $user_id);
$selects['users']->updateAttributes(array('class'=>'input'));
Cheers
Graham
At 09:44 AM 7/22/2003 -0700, Graham Clarke wrote:
Does anyone have some insight into what causes this warning? I've included the code from PEAR/DB.php w/ line numbers below. cheers Graham error number: 2 (E_WARNING) error message: Failed opening 'DB/3.php' for inclusionGraham Clarke GrahamC@53Tech.com www.53Tech.com 603.643.9955in file: /usr/share/pear/DB.php line num: 278line in PEAR/DB.php264 > function &connect($dsn, $options = false) { if (is_array($dsn)) { $dsninfo = $dsn; } else { $dsninfo = DB::parseDSN($dsn); 270 > } $type = $dsninfo["phptype"];if (is_array($options) && isset($options["debug"]) && $options["debug"] >= 2) { 275 > // expose php errors with sufficient debug level include_once "DB/${type}.php"; } else { 278 > @include_once "DB/${type}.php"; }Graham Clarke GrahamC@53Tech.com www.53Tech.com 603.643.9955