From 03835c0247c039b3794d5df2017e55e06447b258 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 10 Nov 2021 12:14:58 +0100 Subject: [PATCH] fix PHP 8.0 TypeError: strpos(): Argument #1 ($haystack) must be of type string, array given --- api/src/Storage/History.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/Storage/History.php b/api/src/Storage/History.php index 6868d73241..4a9f8ff45d 100644 --- a/api/src/Storage/History.php +++ b/api/src/Storage/History.php @@ -403,8 +403,8 @@ class History */ public static function needs_diff($name, $value) { - // No diff on encrypted content - if(strpos($value, static::BEGIN_PGP) == 0 && strpos($value, static::END_PGP) !== FALSE) + // No diff on arrays or encrypted content + if (is_array($value) || strpos($value, static::BEGIN_PGP) == 0 && strpos($value, static::END_PGP) !== FALSE) { return false; }