]> git.mxchange.org Git - friendica.git/commitdiff
Reverted some changes that won't work with PHP7.3
authorThorsten <thorsten.daners@antwerpes.de>
Fri, 18 Nov 2022 18:41:56 +0000 (19:41 +0100)
committerThorsten <thorsten.daners@antwerpes.de>
Fri, 18 Nov 2022 18:41:56 +0000 (19:41 +0100)
src/App/Page.php
src/BaseCollection.php
src/Content/Conversation.php
src/Content/Nav.php
src/Core/Session/Handler/Database.php
src/Database/Database.php
src/Model/Log/ParsedLogIterator.php

index 5f4ac0f6ddff88660226b162714e387b6403362c..0f14d9f6e6530106ecbb87b0bd922a894ddcf4e8 100644 (file)
@@ -130,7 +130,7 @@ class Page implements ArrayAccess
         * The return value will be casted to boolean if non-boolean was returned.
         * @since 5.0.0
         */
-       public function offsetExists(mixed $offset): bool
+       public function offsetExists($offset): bool
        {
                return isset($this->page[$offset]);
        }
@@ -147,7 +147,7 @@ class Page implements ArrayAccess
         * @return mixed Can return all value types.
         * @since 5.0.0
         */
-       public function offsetGet(mixed $offset): mixed
+       public function offsetGet($offset)
        {
                return $this->page[$offset] ?? null;
        }
@@ -167,7 +167,7 @@ class Page implements ArrayAccess
         * @return void
         * @since 5.0.0
         */
-       public function offsetSet(mixed $offset, mixed $value): void
+       public function offsetSet($offset, $value)
        {
                $this->page[$offset] = $value;
        }
@@ -184,7 +184,7 @@ class Page implements ArrayAccess
         * @return void
         * @since 5.0.0
         */
-       public function offsetUnset(mixed $offset): void
+       public function offsetUnset($offset)
        {
                if (isset($this->page[$offset])) {
                        unset($this->page[$offset]);
index c711755722c13804bb1fdef439b700bf58c62375..f6fa9bbd4dec7329215b81cb644f3260a4f0c2eb 100644 (file)
@@ -48,7 +48,7 @@ class BaseCollection extends \ArrayIterator
        /**
         * @inheritDoc
         */
-       public function offsetSet(mixed $offset, mixed $value): void
+       public function offsetSet($offset, $value)
        {
                if (is_null($offset)) {
                        $this->totalCount++;
@@ -60,7 +60,7 @@ class BaseCollection extends \ArrayIterator
        /**
         * @inheritDoc
         */
-       public function offsetUnset(mixed $offset): void
+       public function offsetUnset($offset)
        {
                if ($this->offsetExists($offset)) {
                        $this->totalCount--;
index 46a906b13829ca1448e1e2d6736b7ad67579be6a..da9aee87b00aee1090954c904e1bda589abcdc4d 100644 (file)
@@ -794,10 +794,7 @@ class Conversation
                        return [];
                }
 
-               $blocked = $this->pConfig->get($this->session->getLocalUserId(), 'system', 'blocked');
-               if (!empty($blocked)) {
-                       $str_blocked = str_replace(["\n", "\r"], ",", $blocked);
-               }
+               $str_blocked = str_replace(["\n", "\r"], ",", $this->pConfig->get($this->session->getLocalUserId(), 'system', 'blocked'));
                if (empty($str_blocked)) {
                        return [];
                }
index 17fb1d12ce6272557f8a1a8c9bba2da1a1819446..0000b3d2962f3b35c390d61fb3f0fba195937f41 100644 (file)
@@ -245,7 +245,7 @@ class Nav
 
                $gdirpath = 'directory';
 
-               if (empty(DI::config()->get('system', 'singleuser'))) {
+               if (strlen(DI::config()->get('system', 'singleuser'))) {
                        $gdir = DI::config()->get('system', 'directory');
                        if (strlen($gdir)) {
                                $gdirpath = Profile::zrl($gdir, true);
index 6d067d8b6f34dcab783a2b3d354f4969d86f8a47..41ccb6b33f834e4f315fef4b6b78a5f2813bebff 100644 (file)
@@ -57,7 +57,7 @@ class Database extends AbstractSessionHandler
                return true;
        }
 
-       public function read($id): string|false
+       public function read($id)
        {
                if (empty($id)) {
                        return '';
@@ -136,7 +136,7 @@ class Database extends AbstractSessionHandler
                }
        }
 
-       public function gc($max_lifetime): int|false
+       public function gc($max_lifetime): bool
        {
                try {
                        return $this->dba->delete('session', ["`expire` < ?", time()]);
index 5dac99bcee88528618d04c321e6f148199ed42ca..79c39e9af763c7dccd4ea8b82c5a7ee659cb57d3 100644 (file)
@@ -117,7 +117,7 @@ class Database
                        $port = trim($serverdata[1]);
                }
 
-               if (!empty(trim((string) $this->configCache->get('database', 'port')))) {
+               if (!empty(trim($this->configCache->get('database', 'port')))) {
                        $port = trim($this->configCache->get('database', 'port'));
                }
 
index 151a66adb472d74538a6f1496187136725566d4a..4309e4cd002dcd665d281045a3cb3565daae71d7 100644 (file)
@@ -160,7 +160,7 @@ class ParsedLogIterator implements \Iterator
         * @see Iterator::next()
         * @return void
         */
-       public function next(): void
+       public function next()
        {
                $parsed = $this->read();
 
@@ -177,7 +177,7 @@ class ParsedLogIterator implements \Iterator
         * @see Iterator::rewind()
         * @return void
         */
-       public function rewind(): void
+       public function rewind()
        {
                $this->value = null;
                $this->reader->rewind();
@@ -202,7 +202,7 @@ class ParsedLogIterator implements \Iterator
         * @see Iterator::current()
         * @return ?ParsedLogLing
         */
-       public function current(): mixed
+       public function current()
        {
                return $this->value;
        }