Skip to content

Commit

Permalink
Fixed SQL module retrocompatibility with PHP 5.6
Browse files Browse the repository at this point in the history
  • Loading branch information
lastguest authored Jul 15, 2017
1 parent 8833b2e commit a65c853
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion classes/SQL.php
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,8 @@ public function updateWhere($table, $data, $where, $pk='id'){

$q = "UPDATE `$table` SET ".implode(', ',array_filter($k))." WHERE $where";
$this->exec($q, $data);
return $this->last_exec_success ? ((object)$data)->$pk : false;
$data = (object)$data;
return $this->last_exec_success ? $data->$pk : false;
}

public function update($table, $data, $pk='id', $extra_where=''){
Expand Down

0 comments on commit a65c853

Please sign in to comment.