Mapping values to references fails on php7
This commit is contained in:
parent
f04b229644
commit
798d498001
@ -265,11 +265,11 @@
|
|||||||
*/
|
*/
|
||||||
private function loadWithQuery($query, $bindParams = NULL) {
|
private function loadWithQuery($query, $bindParams = NULL) {
|
||||||
$stmt = self::$db->prepare($query);
|
$stmt = self::$db->prepare($query);
|
||||||
if (is_array($bindParams) && ($types = array_shift($bindParams))) {
|
if (is_array($bindParams)) {
|
||||||
call_user_func_array(
|
foreach ($bindParams as $key => &$value) {
|
||||||
[ $stmt, 'bind_param' ],
|
$bindParams[$key] = $value;
|
||||||
array_merge([ $types ], array_map(function(&$param) { return $param; }, $bindParams))
|
}
|
||||||
);
|
call_user_func_array([ $stmt, 'bind_param' ], $bindParams);
|
||||||
}
|
}
|
||||||
if ($stmt->execute()) {
|
if ($stmt->execute()) {
|
||||||
$stmt->bind_result($this->id, $this->timestamp, $this->userId, $this->trackId,
|
$stmt->bind_result($this->id, $this->timestamp, $this->userId, $this->trackId,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user