From b6265b7e37b02b0cdbee3f911c55b4f8a4364f10 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Fri, 17 Sep 2010 20:32:34 +0000 Subject: [PATCH] fixing silyl property_exists() conversion + coding style --- lib/dml/database_column_info.php | 2 +- lib/dml/pgsql_native_moodle_database.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/dml/database_column_info.php b/lib/dml/database_column_info.php index c1d7c9ffced..e7e19879db7 100644 --- a/lib/dml/database_column_info.php +++ b/lib/dml/database_column_info.php @@ -133,7 +133,7 @@ class database_column_info { */ public function __construct($data) { foreach ($data as $key=>$value) { - if (property_exists($key, $this)) { + if (property_exists($this, $key)) { $this->$key = $value; } } diff --git a/lib/dml/pgsql_native_moodle_database.php b/lib/dml/pgsql_native_moodle_database.php index 8ed84712492..044c32a405f 100644 --- a/lib/dml/pgsql_native_moodle_database.php +++ b/lib/dml/pgsql_native_moodle_database.php @@ -177,14 +177,14 @@ class pgsql_native_moodle_database extends moodle_database { $result = pg_query($this->pgsql, $sql); $this->query_end($result); - $this->bytea_oid = pg_fetch_result($result, 0); + $this->bytea_oid = pg_fetch_result($result, 0, 0); pg_free_result($result); if ($this->bytea_oid === false) { $this->pgsql = null; throw new dml_connection_exception('Can not read bytea type.'); } - // Connection stabilished and configured, going to instantiate the temptables controller + // Connection stabilised and configured, going to instantiate the temptables controller $this->temptables = new pgsql_native_moodle_temptables($this); return true;