TSP Posted October 29, 2019 Share 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. Link to comment Share on other sites More sharing options...
bfarber Posted October 30, 2019 Share 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. Link to comment Share on other sites More sharing options...
TSP Posted November 4, 2019 Author Share 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? Link to comment Share on other sites More sharing options...
bfarber Posted November 4, 2019 Share Posted November 4, 2019 Any issues that have been known have been fixed 🙂 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.