Last active
December 16, 2015 07:48
-
-
Save arvola/5400885 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- 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