MyBB Community Forums
[Pushed] Group promotions bug - Printable Version

+- MyBB Community Forums (
+-- Forum: Development (
+--- Forum: MyBB 1.8 Development (
+---- Forum: 1.8 Bugs and Issues (
+----- Forum: Pushed (
+----- Thread: [Pushed] Group promotions bug (/thread-207494.html)

Group promotions bug - katos - 2017-01-17

Upon editing a group promotion for registered length, and then revisiting the group promotion then the entry that you insert changes to something else. For example, from 2 months to 2 days. In the database, the entry is "=" (see below screenshots) I have confirmed this across three sites: and
These sites are: 1.8.9(Creators Wave and Forum Authority) and 1.8.10(Atlas Industries)

SQL code on the updating of group promotions
SET `title`='Legend', `description`='Became a Legend', `posts`=10000, `posttype`='>', `threads`=0, `threadtype`='>', `registered`=100, `registeredtype`='=', `online`=10, `onlinetype`='years', `reputations`=0, `reputationtype`='>', `referrals`=0, `referralstype`='>', `warnings`=0, `warningstype`='>', `requirements`='postcount,threadcount,reputation,referrals,warnings,timeregistered,timeonline', `originalusergroup`='12', `newusergroup`=16, `usergrouptype`='primary', `enabled`=1, `logging`=1 WHERE pid = '11'

[Image: dfb15b25fd.png]

notice how registered type is still = while onlinetype works just fine.
The registertypes that have "months" were manually adjusted through the database. While the ones with = were saved from the admincp. Even if you edit it in the database and then you make an adjustment from the admincp and save... it'll change it back to =

RE: Group promotions bug - Starpaul20 - 2017-01-17

I can confirm this bug. It seems to be caused by this bit of code in the add/edit section:

			$allowed_operators = array('>', '>=', '=', '<=', '<');
			$operator_fields = array('posttype', 'threadtype', 'timeregisteredtype', 'reputationtype', 'referralstype', 'warningstype');

			foreach($operator_fields as $field)
				if(!in_array($mybb->get_input($field), $allowed_operators))
					$mybb->input[$field] = '=';

Either we remove timeregisteredtype from the $operator_fields array or add the times to the $allowed_operators array.

RE: Group promotions bug - Euan T - 2017-01-17

Moving this to the bug reports forum since it's confirmed, thanks for checking Starpaul Smile

RE: Group promotions bug - Euan T - 2017-01-17


Thank you for your report. We have pushed this issue to our Github repository for further analysis where you can track our commits and progress with fixing this bug. Discussions regarding this bug may also take place there too.

Follow this link to visit the issue on Github:

Thanks for contributing to MyBB!

The MyBB Group