Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
TSP Posted October 29, 2019 Posted October 29, 2019 Hi, I'm going through the upgrade code for 3.4 -> 4.x. In applications/core/setup/upg_40000/upgrade.php I found what appears to be an unused variable. Around line 2410 you have the following code: <?php if( \is_array( $data ) AND $_decoded ) { $newPoll = array(); foreach( $data as $_key => $_data ) { if( isset( $_data['question'] ) ) { $data[ $_key ]['question'] = utf8_encode( $_data['question'] ); if( \is_array( $_data['choice'] ) ) { foreach( $_data['choice'] as $_idx => $_choice ) { $data[ $_key ]['choice'][ $_idx ] = utf8_encode( $_choice ); } } } else { $newPoll[0]['question'] = $poll['poll_question']; $newPoll[0]['choice'][] = utf8_encode( $_data[1] ); } } } You never actually use the $newPoll-variable.
bfarber Posted October 30, 2019 Posted October 30, 2019 Looks like you're right. That said, we're not getting bug reports about this part of the code and I'm not keen to go touch it (since it's fairly challenging to fully test properly) without good reason first.
TSP Posted November 4, 2019 Author Posted November 4, 2019 @bfarber I figured, I just couldn't keep myself from mentioning it. Maybe we should have a topic to report minor code stuff like this. Anyway, I'll soon be upgrading Diskusjon.no from 3.4.9 to 4.4.7. So on a related note I wonder if you're aware of any known issues I should watch out for?
bfarber Posted November 4, 2019 Posted November 4, 2019 Any issues that have been known have been fixed 🙂
Recommended Posts
Archived
This topic is now archived and is closed to further replies.