Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Improved sqlValue and changed its test.

  • Loading branch information...
commit 595906efeb07692f21c0e72ce5d7f93f873aaace 1 parent 60352cc
@gpongelli authored
5 libraries/joomla/database/driver/postgresql.php
@@ -787,7 +787,7 @@ public function setUTF()
* This function return a field value as a prepared string to be used in a SQL statement.
- * @param array $columns Array of table's column returned by ::getTableColumns.
+ * @param array $columns Array of table's column returned by JDatabasePostgreSQL::getTableColumns.

I think it should be &$columns - there is a coding style error.

Doc comment for var $columns does not match actual variable name &$columns at position 1

@gpongelli Owner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
* @param string $field_name The table field's name.
* @param string $field_value The variable value to quote and return.
@@ -795,7 +795,7 @@ public function setUTF()
* @since 11.3
- public function sqlValue($columns, $field_name, $field_value)
+ protected function sqlValue(&$columns, $field_name, $field_value)
switch ($columns[$field_name])
@@ -814,7 +814,6 @@ public function sqlValue($columns, $field_name, $field_value)
case 'bigserial':
case 'integer':
case 'money':
- case 'numeric':
case 'real':
case 'smallint':
case 'serial':
2  tests/suites/database/driver/postgresql/JDatabasePostgresqlTest.php
@@ -1179,7 +1179,7 @@ public function testSqlValue()
foreach (get_object_vars($tst) as $key => $val)
- $values[] = self::$driver->sqlValue($tablCol, $key, $val);
+ $values[] = TestReflection::invoke(self::$driver, 'sqlValue', $tablCol, $key, $val);
Please sign in to comment.
Something went wrong with that request. Please try again.