Permalink
Browse files

replace unnecessary call_user_func_array

  • Loading branch information...
1 parent acea2c7 commit bfe0b14548db931240a797d2bffe53de017bc2ad @bproctor committed Feb 21, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 db.php
View
4 db.php
@@ -375,7 +375,7 @@ public function insert_array($table, array $data) {
$s2 .= '"' . $v . '", ';
}
$sql = 'INSERT INTO `' . $table .'` ' . substr($s1, 0, -2) . ' VALUES (' . substr($s2, 0, -2) . ')';
- if (call_user_func_array(array('DB_Driver', 'query'), $sql) === false) {
+ if ($this->query($sql) === false) {
return false;
}
return $this->write_conn->insert_id;
@@ -415,7 +415,7 @@ public function update() {
*/
public function update_array($table, array $data, $sql = null) {
$str = 'UPDATE `' . $table . '` SET ' . substr($str, 0, -2) . $sql;
- if (call_user_func_array(array('DB_Driver', 'query'), $args) === false) {
+ if ($this->query($str) === false) {
return false;
}
return $this->write_conn->affected_rows;

0 comments on commit bfe0b14

Please sign in to comment.