mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-10-05 18:34:20 +02:00
pass by reference, closes #858
This commit is contained in:
parent
5d4561bd0a
commit
8ad6300c1c
11 changed files with 94 additions and 46 deletions
|
@ -165,7 +165,7 @@ class S3Storage extends AbstractData
|
|||
* @param $payload array to store
|
||||
* @return bool true if successful, otherwise false.
|
||||
*/
|
||||
private function _upload($key, $payload)
|
||||
private function _upload($key, &$payload)
|
||||
{
|
||||
$metadata = array_key_exists('meta', $payload) ? $payload['meta'] : array();
|
||||
unset($metadata['attachment'], $metadata['attachmentname'], $metadata['salt']);
|
||||
|
@ -191,7 +191,7 @@ class S3Storage extends AbstractData
|
|||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function create($pasteid, array $paste)
|
||||
public function create($pasteid, array &$paste)
|
||||
{
|
||||
if ($this->exists($pasteid)) {
|
||||
return false;
|
||||
|
@ -263,7 +263,7 @@ class S3Storage extends AbstractData
|
|||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function createComment($pasteid, $parentid, $commentid, array $comment)
|
||||
public function createComment($pasteid, $parentid, $commentid, array &$comment)
|
||||
{
|
||||
if ($this->existsComment($pasteid, $parentid, $commentid)) {
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue