Solved Compatibility issue with the Gift Upgrades add-on by NixFifty

david

Licensed
Licensed
Invite System
User Upgrade Duration
Joined
Nov 1, 2019
Messages
3
Reaction score
2
When gifting a custom duration, it always gifts the default duration. I suspect that it's always selecting index 0 of the dropdown no matter what is selected.

I'm not 100% sure if the problem is on NixFifty's side but I will contact them about it as well.

I sent a DM to CRUEL-MODZ about this but I thought it's better to make a thread as well since there's now a support section for different add-ons.
 
Solution
Hello there,

Should be good by now with 2.1.2 Fix 8 :

Regards, SyTry
Hello,

When gifting a custom duration, it always gifts the default duration. I suspect that it's always selecting index 0 of the dropdown no matter what is selected.

I'm not 100% sure if the problem is on NixFifty's side but I will contact them about it as well.

I sent a DM to CRUEL-MODZ about this but I thought it's better to make a thread as well since there's now a support section for different add-ons.
I totally forgot—sorry. I had a problem with my localhost. You did the right thing by starting a thread—thanks! I'll take a look at it tonight if I can. Sorry!

Regards, CRUEL-MODZ
 
Hello there,

Should be good by now with 2.1.2 Fix 8 :

Regards, SyTry
 
Solution
Hello CRUEL-MODZ

I have recently updated the User Upgrade Duration add-on to 2.1.2 Fix 8 to resolve the foreach() null warning related to the Gift Upgrades integration. (My XF version 2.2.19)

However, I am still receiving the exact same server error log on my forum after the update. I am currently using Gift Upgrades version 2.6.2 by NixFifty.

Could you please confirm if Fix 8 was specifically designed for Gift Upgrades 2.7.0 / 2.7.1+? If so, does that mean this fix is incompatible with older 2.6.x versions of Gift Upgrades?

Here is my server error log after upgrading to 2.1.2 Fix 8:
Code:
Server error log
ErrorException: [E_WARNING] foreach() argument must be of type array|object, null given src/addons/XenSoluce/UserUpgradeDuration/NF/GiftUpgrades/ControllerPlugin/Gift.php:35
Generated by: Unknown account Jun 12, 2026 at 2:16 AM
Stack trace
#0 src/addons/XenSoluce/UserUpgradeDuration/NF/GiftUpgrades/ControllerPlugin/Gift.php(35): XF::handlePhpError(2, '[E_WARNING] for...', '/home/pvpers/pu...', 35)
#1 src/addons/XenSoluce/UserUpgradeDuration/NF/GiftUpgrades/ControllerPlugin/Gift.php(25): XenSoluce\UserUpgradeDuration\NF\GiftUpgrades\ControllerPlugin\Gift->getDuractionUpgrade(NULL)
#2 src/addons/NF/GiftUpgrades/XF/Pub/Controller/Member.php(26): XenSoluce\UserUpgradeDuration\NF\GiftUpgrades\ControllerPlugin\Gift->actionGift(Object(OzzModz\EmailWhitelist\XF\Entity\User))
#3 src/XF/Mvc/Dispatcher.php(352): NF\GiftUpgrades\XF\Pub\Controller\Member->actionGift(Object(XF\Mvc\ParameterBag))
#4 src/XF/Mvc/Dispatcher.php(258): XF\Mvc\Dispatcher->dispatchClass('XF:Member', 'Gift', Object(XF\Mvc\RouteMatch), Object(Z61\Classifieds\XF\Pub\Controller\Member), NULL)
#5 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(Z61\Classifieds\XF\Pub\Controller\Member), NULL)
#6 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#7 src/XF/App.php(2513): XF\Mvc\Dispatcher->run()
#8 src/XF.php(524): XF\App->run()
#9 index.php(20): XF::runApp('XF\\Pub\\App')
#10 {main}
Request state
array(4) {
  ["url"] => string(22) "/uye/umut2867.810/gift"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

Thank you for your assistance.
 
Hello there,

Should be good by now with 2.1.2 Fix 8 :

Regards, SyTry
A bit late, but I can confirm that the problem has been solved.

Thank you!
 
Hello CRUEL-MODZ

I have recently updated the User Upgrade Duration add-on to 2.1.2 Fix 8 to resolve the foreach() null warning related to the Gift Upgrades integration. (My XF version 2.2.19)

However, I am still receiving the exact same server error log on my forum after the update. I am currently using Gift Upgrades version 2.6.2 by NixFifty.

Could you please confirm if Fix 8 was specifically designed for Gift Upgrades 2.7.0 / 2.7.1+? If so, does that mean this fix is incompatible with older 2.6.x versions of Gift Upgrades?

Here is my server error log after upgrading to 2.1.2 Fix 8:
Code:
Server error log
ErrorException: [E_WARNING] foreach() argument must be of type array|object, null given src/addons/XenSoluce/UserUpgradeDuration/NF/GiftUpgrades/ControllerPlugin/Gift.php:35
Generated by: Unknown account Jun 12, 2026 at 2:16 AM
Stack trace
#0 src/addons/XenSoluce/UserUpgradeDuration/NF/GiftUpgrades/ControllerPlugin/Gift.php(35): XF::handlePhpError(2, '[E_WARNING] for...', '/home/pvpers/pu...', 35)
#1 src/addons/XenSoluce/UserUpgradeDuration/NF/GiftUpgrades/ControllerPlugin/Gift.php(25): XenSoluce\UserUpgradeDuration\NF\GiftUpgrades\ControllerPlugin\Gift->getDuractionUpgrade(NULL)
#2 src/addons/NF/GiftUpgrades/XF/Pub/Controller/Member.php(26): XenSoluce\UserUpgradeDuration\NF\GiftUpgrades\ControllerPlugin\Gift->actionGift(Object(OzzModz\EmailWhitelist\XF\Entity\User))
#3 src/XF/Mvc/Dispatcher.php(352): NF\GiftUpgrades\XF\Pub\Controller\Member->actionGift(Object(XF\Mvc\ParameterBag))
#4 src/XF/Mvc/Dispatcher.php(258): XF\Mvc\Dispatcher->dispatchClass('XF:Member', 'Gift', Object(XF\Mvc\RouteMatch), Object(Z61\Classifieds\XF\Pub\Controller\Member), NULL)
#5 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(Z61\Classifieds\XF\Pub\Controller\Member), NULL)
#6 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#7 src/XF/App.php(2513): XF\Mvc\Dispatcher->run()
#8 src/XF.php(524): XF\App->run()
#9 index.php(20): XF::runApp('XF\\Pub\\App')
#10 {main}
Request state
array(4) {
  ["url"] => string(22) "/uye/umut2867.810/gift"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

Thank you for your assistance.
Yes, it's compatible, but you're getting a strange error. I'll take a look at it.
 
Back
Top Bottom