Version 5.0.0 beta 6

This commit is contained in:
Neo committed 2025-12-19 17:12:27 -08:00
1 parent 57d9db6ce2
commit fa2a720105
115 files changed
+1823 -1147

No files matched your search

+15 -3
View File
@@ -12,6 +12,7 @@ namespace IPS;
/* To prevent PHP errors (extending class does not exist) revealing path */
use BadFunctionCallException;
use BadMethodCallException;
use DateInterval;
use DateTimeZone;
@@ -699,7 +700,7 @@ class Member extends ActiveRecord
public function set_member_group_id( int $value ) : void
{
$this->_data['member_group_id'] = $value;
$this->_group = NULL;
$this->resetGroupsCaches();
}
/**
@@ -717,7 +718,7 @@ class Member extends ActiveRecord
}
$this->_data['mgroup_others'] = implode( ',', $groups );
$this->_group = NULL;
$this->resetGroupsCaches();
}
/**
@@ -1086,6 +1087,17 @@ class Member extends ActiveRecord
*/
protected ?array $_groups = NULL;
/**
* Reset the group and groups cache
*
* @return void
*/
protected function resetGroupsCaches(): void
{
$this->_group = NULL;
$this->_groups = NULL;
}
/**
* Get an array of the group IDs (including secondary groups) this member belongs to
*
@@ -4367,7 +4379,7 @@ class Member extends ActiveRecord
{
$location = GeoLocation::getRequesterLocation();
}
catch( BadMethodCallException| Http\Request\Exception | RuntimeException |OutOfRangeException $e )
catch( BadFunctionCallException | BadMethodCallException| Http\Request\Exception | RuntimeException |OutOfRangeException $e )
{
/* If it fails for any reason, don't bother. */
Log::debug( $e, 'spam-service' );