pass by reference, closes #858

This commit is contained in:
El RIDO
2025-03-13 09:22:27 +01:00
parent 5d4561bd0a
commit 8ad6300c1c
11 changed files with 94 additions and 46 deletions
+3 -3
View File
@@ -105,7 +105,7 @@ class GoogleCloudStorage 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']);
@@ -136,7 +136,7 @@ class GoogleCloudStorage extends AbstractData
/**
* @inheritDoc
*/
public function create($pasteid, array $paste)
public function create($pasteid, array &$paste)
{
if ($this->exists($pasteid)) {
return false;
@@ -201,7 +201,7 @@ class GoogleCloudStorage 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;