cdprojektred
Customer
Hello,
There is a hard to explain problem with data integrity, let me show it in a pseudocode:
In class_core.php:check_feature_by_typenames():
self::verify_rewards_cache($userinfo);
at this point $userinfo['dbtech_vbactivity_rewardscache'] is an array, good!
then in:
foreach ($features as $featureid) {
check_feature() call check_criteria()
if (!is_array($userinfo['dbtech_vbactivity_rewardscache']))
... break; // if this occur you stop checking rest of achievements
}
Most critera types do something like this:
type/dayregistered.php:check_criteria():
if (!$userinfo['joindate'])
{
// We need more info
$userinfo = array_merge($userinfo, fetch_userinfo($userinfo['userid']));
}
A this point $userinfo['dbtech_vbactivity_rewardscache'] is again serialized php string not an array what cause break foreach loop in check_feature_by_typenames() above
This causes a problem that very often only the first achievement will be checked. If the first check_feature() fail, then other will be skipeed.
There is a hard to explain problem with data integrity, let me show it in a pseudocode:
In class_core.php:check_feature_by_typenames():
self::verify_rewards_cache($userinfo);
at this point $userinfo['dbtech_vbactivity_rewardscache'] is an array, good!
then in:
foreach ($features as $featureid) {
check_feature() call check_criteria()
if (!is_array($userinfo['dbtech_vbactivity_rewardscache']))
... break; // if this occur you stop checking rest of achievements
}
Most critera types do something like this:
type/dayregistered.php:check_criteria():
if (!$userinfo['joindate'])
{
// We need more info
$userinfo = array_merge($userinfo, fetch_userinfo($userinfo['userid']));
}
A this point $userinfo['dbtech_vbactivity_rewardscache'] is again serialized php string not an array what cause break foreach loop in check_feature_by_typenames() above
This causes a problem that very often only the first achievement will be checked. If the first check_feature() fail, then other will be skipeed.