Invision Community 5: A video walkthrough creating a custom theme and homepage By Matt Thursday at 04:02 PM
SoftwareFactory Posted November 21, 2019 Posted November 21, 2019 On 11/20/2019 at 11:17 AM, Daniel F said: Hi, your app has a huge flaw affecting everybody who's using crons. Quote RuntimeException(LOCATION_UNKNOWN) #0 /var/www/html/m284926/system/Member/Member.php(154): IPS\_Session::i() #1 /var/www/html/m284926/system/Member/Group.php(115): IPS\_Member::loggedIn() #2 /var/www/html/m284926/system/Member/Group.php(138): IPS\Member\_Group::getStore() #3 /var/www/html/m284926/applications/brilliantdiscord/extensions/core/Queue/MassSynchronization.php(39): IPS\Member\_Group::groups(true, false) The exception above has been recently reported to me, it can occur when using \IPS\Member\Group::groups() in tasks executed by cron. In \IPS\Member\Group::getStore() i found the following code: if ( !isset( \IPS\Data\Store::i()->groups ) ) { \IPS\Data\Store::i()->groups = iterator_to_array( \IPS\Db::i()->select( 'core_groups.*', 'core_groups', NULL, 'core_sys_lang_words.word_custom' )->join( 'core_sys_lang_words', array( "lang_id=? AND word_app=? AND word_key=CONCAT( 'core_group_', core_groups.g_id )", \IPS\Member::loggedIn()->language()->id, 'core' ) )->setKeyField( 'g_id' ) ); } # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ I could (and I will do it of course) stop using \IPS\Member\Group::groups() in tasks, but using currently logged in member language to sort groups alphabetically and saving it in datastore (it's used also for members than may use a different language) doesn't look like a desired behavior.
bfarber Posted November 22, 2019 Posted November 22, 2019 I've logged an internal bug report to have this checked on. Any changes made wouldn't likely be until a major version, however just fyi.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.