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) {
|
||||
$stmt = self::$db->prepare($query);
|
||||
if (is_array($bindParams) && ($types = array_shift($bindParams))) {
|
||||
call_user_func_array(
|
||||
[ $stmt, 'bind_param' ],
|
||||
array_merge([ $types ], array_map(function(&$param) { return $param; }, $bindParams))
|
||||
);
|
||||
if (is_array($bindParams)) {
|
||||
foreach ($bindParams as $key => &$value) {
|
||||
$bindParams[$key] = $value;
|
||||
}
|
||||
call_user_func_array([ $stmt, 'bind_param' ], $bindParams);
|
||||
}
|
||||
if ($stmt->execute()) {
|
||||
$stmt->bind_result($this->id, $this->timestamp, $this->userId, $this->trackId,
|
||||
|
Loading…
x
Reference in New Issue
Block a user