Skip to content

Instantly share code, notes, and snippets.

@arvola
Last active December 16, 2015 07:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arvola/5400885 to your computer and use it in GitHub Desktop.
Save arvola/5400885 to your computer and use it in GitHub Desktop.
--- interface/lib/classes/remoting_lib.inc.php (revision 3962)
+++ interface/lib/classes/remoting_lib.inc.php (working copy)
@@ -817,11 +817,11 @@
if(@is_numeric($primary_id)) {
$sql = "SELECT * FROM ".$escape.$this->formDef['db_table'].$escape." WHERE ".$this->formDef['db_table_idx']." = ".$primary_id;
return $app->db->queryOneRecord($sql);
- } elseif (@is_array($primary_id)) {
+ } elseif (@is_array($primary_id) || @is_object($primary_id)) {
$sql_offset = 0;
$sql_limit = 0;
$sql_where = '';
- foreach($primary_id as $key => $val) {
+ foreach((array)$primary_id as $key => $val) {
$key = $app->db->quote($key);
$val = $app->db->quote($val);
if($key == '#OFFSET#') $sql_offset = $app->functions->intval($val);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment