Reverted some changes that won't work with PHP7.3
This commit is contained in:
parent
7a39be8270
commit
2edbd1a3e2
|
@ -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]);
|
||||
|
|
|
@ -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--;
|
||||
|
|
|
@ -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 [];
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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()]);
|
||||
|
|
|
@ -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'));
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user