[development] Patch for drupal 5.2

Mo DeJong mo at modejong.com
Fri Nov 16 00:46:00 UTC 2007


Hello

Here is a quick patch to avoid an warning message with drupal 5.2 and 
Postgres:

P.S.
I tried to submit a bug report but all the links I could find were broken:

http://lists.drupal.org/listinfo/development (link "bug tracker 
<http://www.drupal.org/project/drupal/issues>" is broken)
http://drupal.org/support (link "submit a bug report 
<http://drupal.org/node/add/project_issue?project=drupal&category=bug>" 
goes to page with nothing on it)

cheers
Mo

*diff -ur clean_drupal-5.2/includes/install.pgsql.inc 
drupal-5.2/includes/install.pgsql.inc
--- clean_drupal-5.2/includes/install.pgsql.inc    Wed Dec 27 05:02:34 2006
+++ drupal-5.2/includes/install.pgsql.inc    Thu Nov 15 15:56:08 2007
@@ -93,7 +93,7 @@
   // Test UNLOCK, which is done automatically upon transaction end in 
PostgreSQL
   $query = 'COMMIT';
   $result = pg_query($connection, $query);
-  if ($error = pg_result_error()) {
+  if ($error = pg_result_error($result)) {
     drupal_set_message(st('We were unable to unlock a test table on 
your PostgreSQL database server. We tried unlocking a table with the 
command %query and PostgreSQL reported the following error: %error.', 
array('%query' => $query, '%error' => $error)), 'error');
     $err = TRUE;
   }
@@ -104,7 +104,7 @@
   // Test DELETE.
   $query = 'DELETE FROM drupal_install_test';
   $result = pg_query($connection, $query);
-  if ($error = pg_result_error()) {
+  if ($error = pg_result_error($result)) {
     drupal_set_message(st('We were unable to delete a value from a test 
table on your PostgreSQL database server. We tried deleting a value with 
the command %query and PostgreSQL reported the following error: 
%error.', array('%query' => $query, '%error' => $error)), 'error');
     $err = TRUE;
   }
@@ -115,7 +115,7 @@
   // Test DROP.
   $query = 'DROP TABLE drupal_install_test';
   $result = pg_query($connection, $query);
-  if ($error = pg_result_error()) {
+  if ($error = pg_result_error($result)) {
     drupal_set_message(st('We were unable to drop a test table from 
your PostgreSQL database server. We tried dropping a table with the 
command %query and PostgreSQL reported the following error %error.', 
array('%query' => $query, '%error' => $error)), 'error');
     $err = TRUE;
   }*


More information about the development mailing list