From 0ec3dc02f2950077984899d40692fa913be5f0bf Mon Sep 17 00:00:00 2001 From: hawk__ Date: Mon, 1 Aug 2011 23:07:34 +0000 Subject: [PATCH] Throw an error message when PostgreSQL extension is not loaded into PHP git-svn-id: https://plugins.svn.wordpress.org/postgresql-for-wordpress/trunk@418091 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- pg4wp/driver_pgsql.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pg4wp/driver_pgsql.php b/pg4wp/driver_pgsql.php index a3afe9b..0312449 100644 --- a/pg4wp/driver_pgsql.php +++ b/pg4wp/driver_pgsql.php @@ -12,6 +12,9 @@ * * This was originally based on usleepless's original 'mysql2pgsql.php' file, many thanks to him */ + // Check pgsql extension is loaded + if ( !extension_loaded('pgsql') ) + wp_die( 'Your PHP installation appears to be missing the PostgreSQL extension which is required by WordPress with PG4WP.' ); // Load up upgrade and install functions as required if( defined( 'WP_INSTALLING') && WP_INSTALLING)