dev

Forked from tuleap/dev

Clone or download

Read-only

Actually fix request #5554: Cannot select CSV preference in use prefs page

This is a tricky one. TL;DR: autoload should not be used to load "automagically" old src/www/include stuff because variables will not be defined. Long story, you shall take pop corn: Long time ago, "standards" said that it was great to define variables (like csv_separators) in files like utils.php and to reuse this variable wherever needed. Due to some require magic (dependency hell), it was available anywhere. Fast forward to 6.7 release, we try to autoload anything of core. So, utils.php is still loaded by some require magic (here its through tracker date reminder plugin and tracker v3) but it's not longer an explicit require, on plugin init, it's made though a function call (autoload is a function) so utils.php is loaded in a function too. Consequence: csv_separator is defined in a function, when the function ends, it's no longer defined. Not a problem you say, "let's require utils.php explicitly where I needed it"! Not that simple padawan, if you require_once utils.php after pre.php, php will tell ya "utils.php" is already loaded, skip it => GTFO! So, the only valid way to fix that is to: - avoid usage of shared variables (should be const or functions) - otherwise avoid magic inclusions (it's the purpose of this commit). That's all folks! Change-Id: I876646d9aeb4b37c90acaf4c25120398e9502629

Modified Files

Name
M plugins/tracker_date_reminder/include/tracker_date_reminderPlugin.class.php +1 −5 Go to diff View file