From cb82657a584f10140486d2fe4687760a75c697f4 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Tue, 27 Oct 2020 08:48:19 +0200 Subject: [PATCH] Fix for PHP8 array_push --- src/Appwrite/Database/Document.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Database/Document.php b/src/Appwrite/Database/Document.php index 2a472b839a..e70fce113f 100644 --- a/src/Appwrite/Database/Document.php +++ b/src/Appwrite/Database/Document.php @@ -110,7 +110,8 @@ class Document extends ArrayObject break; case self::SET_TYPE_APPEND: $this[$key] = (!isset($this[$key]) || !\is_array($this[$key])) ? [] : $this[$key]; - \array_push($this[$key], $value); + // \array_push($this[$key], $value); + $this[$key][count($this[$key])] = $value; break; case self::SET_TYPE_PREPEND: $this[$key] = (!isset($this[$key]) || !\is_array($this[$key])) ? [] : $this[$key];