Various fixes related to PostgreSQL. #1131

Merged
merged 3 commits into from Apr 19, 2012

Projects

None yet

4 participants

@gpongelli

Various fixes reported from this pull request that correct errors coming with PostgreSQL database.
Added insertObject's test.

Eng. Gabriele Pongelli.

@eddieajau eddieajau and 1 other commented on an outdated diff Apr 8, 2012
libraries/joomla/database/driver.php
@@ -832,12 +833,15 @@ public function insertObject($table, &$object, $key = null)
// Prepare and sanitize the fields and values for the database query.
$fields[] = $this->quoteName($k);
- $values[] = $this->quote($v);
+ $values[] = is_numeric($v) ? $v : $this->quote($v);
@eddieajau
eddieajau Apr 8, 2012

I'm not sure this change is wise. I seem to remember some databases require quoting of numeric values if the column is a string type (DB2 maybe?).

@gpongelli
gpongelli Apr 10, 2012

I've received this change from another pull request, I'm restoring it to previous version.

Eng. Gabriele Pongelli

@LouisLandry LouisLandry merged commit d8e0299 into joomla:staging Apr 19, 2012
@mbabker

This change broke extension installation in the CMS. There is no $key variable defined which causes a "Undefined variable: key in libraries/joomla/installer/adapters/component.php on line 483" message.

I know, I'm waiting other fixes and improvement to add them here, including this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment