For extra features offered by phpMyAdmin, <feature>work parameters are used to check whether each feature is active. These are defined at https://github.com/phpmyadmin/phpmyadmin/blob/RELEASE_4_4_11/libraries/relation.lib.php#L421-L438.
PMA_getRelationsParam() returns these values cached in the session and these values will not go undefined unless in a version upgrade. Caching is essential IMO and my suggestion is to mark this ticket as wont-fix requiring the user to re-login upon upgrade.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I see two patterns in accessing these variables $cfgRelation = PMA_getRelationsParam();
$cfgRelation['menuswork']
or $GLOBALS['cfgRelation']['menuswork']
Value for $GLOBALS['cfgRelation'] is set inside PMA_getRelationsParam(). So I do not see any other way of some <feature>work variable being not set, other than in a version upgrade
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think adding isset() verification does not make sense as these variables are always defined except in an upgrade. In fact, these variables can be used to avoid isset() check for other pmadb variables. For example: if ($cfgRelation['menuswork']) {
$groupTable = PMA_Util::backquote($cfgRelation['usergroups']);
}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For extra features offered by phpMyAdmin, <feature>work parameters are used to check whether each feature is active. These are defined at https://github.com/phpmyadmin/phpmyadmin/blob/RELEASE_4_4_11/libraries/relation.lib.php#L421-L438.
PMA_getRelationsParam() returns these values cached in the session and these values will not go undefined unless in a version upgrade. Caching is essential IMO and my suggestion is to mark this ticket as wont-fix requiring the user to re-login upon upgrade.
Madhura,
do you think that a version upgrade explains all occurrences of this incident?
I see two patterns in accessing these variables
$cfgRelation = PMA_getRelationsParam(); $cfgRelation['menuswork']
or
$GLOBALS['cfgRelation']['menuswork']
Value for $GLOBALS['cfgRelation'] is set inside PMA_getRelationsParam(). So I do not see any other way of some <feature>work variable being not set, other than in a version upgrade
Makes sense, so marking as "won't fix" also makes sense (unless someone starts to add isset() verifications everywhere).
I think adding isset() verification does not make sense as these variables are always defined except in an upgrade. In fact, these variables can be used to avoid isset() check for other pmadb variables. For example:
if ($cfgRelation['menuswork']) { $groupTable = PMA_Util::backquote($cfgRelation['usergroups']); }
I think it's better to put this in docs. https://github.com/phpmyadmin/phpmyadmin/pull/1791
Let's hope users will read the doc :) because we have a ton of these error reports.
How about storing version number in the session and if that differs from current one force logout?
That would work (except with the 'config' auth).