From 6cd47a4f5ed0583a66938ff4ac8996bb1576cdc9 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Thu, 24 Jul 2008 12:37:07 +0000 Subject: [PATCH] bug 14907 - DatabasePostgres::fieldType() wasn't defined, fatal errors abound. --- RELEASE-NOTES | 2 +- includes/db/DatabasePostgres.php | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 7850c0f9f2..5f831d3399 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -29,7 +29,7 @@ engine indexing on a per-article basis. === Bug fixes in 1.14 === -None yet +* (bug 14907) DatabasePostgres::fieldType now defined. === API changes in 1.14 === diff --git a/includes/db/DatabasePostgres.php b/includes/db/DatabasePostgres.php index 4d14b0012b..065ad56d56 100644 --- a/includes/db/DatabasePostgres.php +++ b/includes/db/DatabasePostgres.php @@ -1167,6 +1167,16 @@ END; function fieldInfo( $table, $field ) { return PostgresField::fromText($this, $table, $field); } + + /** + * pg_field_type() wrapper + */ + function fieldType( $res, $index ) { + if ( $res instanceof ResultWrapper ) { + $res = $res->result; + } + return pg_field_type( $res, $index ); + } function begin( $fname = 'DatabasePostgres::begin' ) { $this->query( 'BEGIN', $fname ); -- 2.20.1