mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 01:34:55 +02:00
Revert "Fix compatibility with PHP 8.1"
This reverts commit 99338afacb
.
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
* @package POT
|
||||
* @version 0.1.3
|
||||
*/
|
||||
class OTS_Groups_List implements Countable
|
||||
class OTS_Groups_List implements IteratorAggregate, Countable
|
||||
{
|
||||
/**
|
||||
* Groups.
|
||||
@@ -41,7 +41,7 @@ class OTS_Groups_List implements Countable
|
||||
$info['access'] = $group['name'];
|
||||
$this->groups[$group['id']] = new OTS_Group($info);
|
||||
}
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ class OTS_Groups_List implements Countable
|
||||
global $config;
|
||||
$file = $config['data_path'] . 'XML/groups.xml';
|
||||
}
|
||||
|
||||
|
||||
if(!@file_exists($file)) {
|
||||
error('Error: Cannot load groups.xml. More info in system/logs/error.log file.');
|
||||
log_append('error.log', '[OTS_Groups_List.php] Fatal error: Cannot load groups.xml (' . $file . '). It doesnt exist.');
|
||||
@@ -99,7 +99,7 @@ class OTS_Groups_List implements Countable
|
||||
log_append('error.log', '[OTS_Groups_List.php] Fatal error: Cannot load groups.xml (' . $file . '). Error: ' . print_r(error_get_last(), true));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// loads groups
|
||||
foreach($groups->getElementsByTagName('group') as $group)
|
||||
{
|
||||
@@ -157,7 +157,7 @@ class OTS_Groups_List implements Countable
|
||||
if($id > $group_id)
|
||||
$group_id = $id;
|
||||
}
|
||||
|
||||
|
||||
return $group_id;
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ class OTS_Groups_List implements Countable
|
||||
* @since 0.1.5
|
||||
* @return int Amount of all groups.
|
||||
*/
|
||||
public function count(): int
|
||||
public function count()
|
||||
{
|
||||
return count($this->groups);
|
||||
}
|
||||
|
Reference in New Issue
Block a user