cvs: /php4/pear DB.php

From: Date: Fri, 25 Feb 2000 21:18:31 +0000
Subject: cvs: /php4/pear DB.php
Groups: php.version4 
Request: Send a blank email to php-version4+get-10999@lists.php.net to get a copy of this message
ssb Fri Feb 25 13:18:31 2000 EDT Modified files: /php4/pear DB.php Log: add a note about include return values Index: php4/pear/DB.php diff -u php4/pear/DB.php:1.15 php4/pear/DB.php:1.16 --- php4/pear/DB.php:1.15 Thu Feb 17 12:21:01 2000 +++ php4/pear/DB.php Fri Feb 25 13:18:01 2000 @@ -17,7 +17,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: DB.php,v 1.15 2000/02/17 20:21:01 ssb Exp $ +// $Id: DB.php,v 1.16 2000/02/25 21:18:01 ssb Exp $ // // Database independent query interface. // @@ -203,11 +203,20 @@ // "include" should be replaced with "import" once PHP gets it $pkgname = 'DB/' . $type; if (!is_array($USED_PACKAGES) || !$USED_PACKAGES[$pkgname]) { - if (!@include("${pkgname}.php")) { + $file = "${pkgname}.php"; + include($file); +/* + + This suddenly stopped working. I thought include() was supposed to + return a boolean? [ssb 20000218] + + if (!include($file)) { + print "'$file' not found<br>\n"; return DB_ERROR_NOT_FOUND; } else { $USED_PACKAGES[$pkgname] = true; } +*/ } $classname = 'DB_' . $type; $obj = new $classname;

« previous php.version4 (#10999) next »