From: Stig Bakken Date: Fri, 25 Feb 2000 21:18:01 +0000 (+0000) Subject: add a note about include return values X-Git-Tag: PHP-4.0-RC1~414 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=117087697414b89077b2485ed3796f62f75750f9;p=php add a note about include return values --- diff --git a/pear/DB.php b/pear/DB.php index 3439b351cc..6781c58242 100644 --- a/pear/DB.php +++ b/pear/DB.php @@ -203,11 +203,20 @@ class DB { // "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
\n"; return DB_ERROR_NOT_FOUND; } else { $USED_PACKAGES[$pkgname] = true; } +*/ } $classname = 'DB_' . $type; $obj = new $classname;