Skip to content
This repository has been archived by the owner on Nov 26, 2017. It is now read-only.

Commit

Permalink
Merge pull request #1486 from pasamio/insertobject
Browse files Browse the repository at this point in the history
Validate that the key parameter is a string
  • Loading branch information
LouisLandry committed Aug 23, 2012
2 parents b1fded3 + 399353d commit c13cc86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/joomla/database/driver.php
Expand Up @@ -851,7 +851,7 @@ public function insertObject($table, &$object, $key = null)

// Update the primary key if it exists.
$id = $this->insertid();
if ($key && $id)
if ($key && $id && is_string($key))
{
$object->$key = $id;
}
Expand Down

0 comments on commit c13cc86

Please sign in to comment.