|
|
@@ -463,10 +463,11 @@ class Core_Database_Mysql extends Core_Database {
|
|
|
public function UPDATE_OBJ($table, $sql_obj,$timestamp=null,$skip_author=null) {
|
|
|
$structure=self::describe_table_value($table); //todo to cache optimize
|
|
|
$primary=self::show_index_value($table); //todo to cache optimize
|
|
|
+ $sql_obj = (object)$sql_obj;
|
|
|
|
|
|
$primaryKey = V::geti($primary, '', $sql_obj);
|
|
|
if ($primaryKey <= 0) {
|
|
|
- DBG::log(['msg'=>"Missing primary key '{$primary}' in table '{$table}'!", '$sql_obj'=>$sql_obj]);
|
|
|
+ DBG::log(['msg'=>"Missing primary key '{$primary}' in table '{$table}'!", '$sql_obj'=>$sql_obj, '$primaryKey'=>$primaryKey]);
|
|
|
$this->_set_error("Missing primary key '{$primary}' in table '{$table}'!");
|
|
|
return -3;
|
|
|
}
|