2025-01-03, 08:45 PM
The reputation system has several configurable settings which can be exceeded, in which case, a message appears to the member.
When this happens in one place, a warning is thrown for an undefined key. Can be created by exceeding maximum reputation limits and possibly other conditions.
Code up to line 244 shows that 3 conditions are checked when adding a reputation. If an error message is created it gets displayed. The test for the 'nomodal' key is evaluated to determine response.
Fixed, so far, with if(!empty($mybb->input['nomodal']))
Other instances which will generate the same warning are in lines 71, 87, 103, 244, 301, 317, 333, 349, 365, 381, 528. Current forum settings have not triggered other instances.
All test conditions that generate a similar reputation error message use the same test and conditional response to display the message either through the "reputation_add_error_nomodal" template or the "reputation_add_error" template.
Not sure yet what sets that key. Applicable code does not seem to be any different back to 1.8.12. This may be a holdover from when making the transition to modal display. This code is likely obsolete and should be cleaned up.
When this happens in one place, a warning is thrown for an undefined key. Can be created by exceeding maximum reputation limits and possibly other conditions.
Quote:<error>
<dateline>1735834296</dateline>
<datetime>2025-01-02 16:11:36 UTC -0700</datetime>
<script>reputation.php</script>
<line>244</line>
<type>2</type>
<friendly_type>Warning</friendly_type>
<message>Undefined array key "nomodal"</message>
<back_trace>#0 errorHandler->error() called at [/inc/class_error.php:153]
#1 errorHandler->error_callback() called at [/reputation.php:244]
</back_trace>
</error>
Code up to line 244 shows that 3 conditions are checked when adding a reputation. If an error message is created it gets displayed. The test for the 'nomodal' key is evaluated to determine response.
Fixed, so far, with if(!empty($mybb->input['nomodal']))
Other instances which will generate the same warning are in lines 71, 87, 103, 244, 301, 317, 333, 349, 365, 381, 528. Current forum settings have not triggered other instances.
All test conditions that generate a similar reputation error message use the same test and conditional response to display the message either through the "reputation_add_error_nomodal" template or the "reputation_add_error" template.
Not sure yet what sets that key. Applicable code does not seem to be any different back to 1.8.12. This may be a holdover from when making the transition to modal display. This code is likely obsolete and should be cleaned up.