summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xext/pdo_mysql/tests/prepare.inc7
-rwxr-xr-xext/pdo_oci/tests/prepare.inc7
-rwxr-xr-xext/pdo_pgsql/tests/prepare.inc7
3 files changed, 18 insertions, 3 deletions
diff --git a/ext/pdo_mysql/tests/prepare.inc b/ext/pdo_mysql/tests/prepare.inc
index 7bda793609..4e8987390b 100755
--- a/ext/pdo_mysql/tests/prepare.inc
+++ b/ext/pdo_mysql/tests/prepare.inc
@@ -4,7 +4,12 @@ require_once('connection.inc');
$SQL = array();
-$DB = new pdo($CONNECTION, $USER, $PASSWD);
+try {
+ $DB = new pdo($CONNECTION, $USER, $PASSWD);
+} catch (Exception $tmp) {
+ $DB = NULL;
+ return;
+}
foreach(array('test','classtypes') as $name)
{
diff --git a/ext/pdo_oci/tests/prepare.inc b/ext/pdo_oci/tests/prepare.inc
index f243e5c38b..2f7531a5b5 100755
--- a/ext/pdo_oci/tests/prepare.inc
+++ b/ext/pdo_oci/tests/prepare.inc
@@ -4,7 +4,12 @@ require_once('connection.inc');
$SQL = array();
-$DB = new pdo($CONNECTION, $USER, $PASSWORD);
+try {
+ $DB = new pdo($CONNECTION, $USER, $PASSWORD);
+} catch (Exception $tmp) {
+ $DB = NULL;
+ return;
+}
$DB->query('DROP TABLE test');
$DB->query('DROP TABLE classtypes');
diff --git a/ext/pdo_pgsql/tests/prepare.inc b/ext/pdo_pgsql/tests/prepare.inc
index 6e87485799..5667ac6b43 100755
--- a/ext/pdo_pgsql/tests/prepare.inc
+++ b/ext/pdo_pgsql/tests/prepare.inc
@@ -4,7 +4,12 @@ require_once('connection.inc');
$SQL = array();
-$DB = new pdo($CONNECTION);
+try {
+ $DB = new pdo($CONNECTION);
+} catch (Exception $tmp) {
+ $DB = NULL;
+ return;
+}
foreach(array('test','classtypes') as $name)
{