disinclined.org
/
git
/
mudd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b71a818
)
Move conf outside of webroot; fix func invocation
master
author
Dylan Lloyd
<dylan@disinclined.org>
Tue, 7 Feb 2023 19:54:35 +0000
(14:54 -0500)
committer
Dylan Lloyd
<dylan@disinclined.org>
Tue, 7 Feb 2023 19:59:41 +0000
(14:59 -0500)
mud.php
patch
|
blob
|
history
diff --git
a/mud.php
b/mud.php
index
0b09599
..
4309fef
100644
(file)
--- a/
mud.php
+++ b/
mud.php
@@
-22,7
+22,8
@@
abstract class model {
public function query() {
$args = func_get_args();
$statement = $this->db->prepare(array_shift($args));
public function query() {
$args = func_get_args();
$statement = $this->db->prepare(array_shift($args));
- if ($args) call_user_func_array(array($statement, 'bind_param'), &$args);
+ #if ($args) call_user_func_array(array($statement, 'bind_param'), &$args);
+ if ($args) call_user_func_array(array($statement, 'bind_param'), $args);
$statement->execute();
$statement->store_result();
$statement->store_result();
$statement->execute();
$statement->store_result();
$statement->store_result();
@@
-44,7
+45,7
@@
abstract class model {
public function insert() {
$args = func_get_args();
$statement = $this->db->prepare(array_shift($args));
public function insert() {
$args = func_get_args();
$statement = $this->db->prepare(array_shift($args));
- call_user_func_array(array($statement, 'bind_param'),
&
$args);
+ call_user_func_array(array($statement, 'bind_param'), $args);
$statement->execute();
return $this->db->insert_id;
}
$statement->execute();
return $this->db->insert_id;
}
@@
-52,7
+53,7
@@
abstract class model {
public function update() {
$args = func_get_args();
$statement = $this->db->prepare(array_shift($args));
public function update() {
$args = func_get_args();
$statement = $this->db->prepare(array_shift($args));
- call_user_func_array(array($statement, 'bind_param'),
&
$args);
+ call_user_func_array(array($statement, 'bind_param'), $args);
$statement->execute();
return $this->db->insert_id;
}
$statement->execute();
return $this->db->insert_id;
}