pass by reference, closes #858

This commit is contained in:
El RIDO 2025-03-13 09:22:27 +01:00
parent 5d4561bd0a
commit 8ad6300c1c
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92
11 changed files with 94 additions and 46 deletions

View file

@ -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;