What's new
Xen Factory

Register today to become a member! Once signed in, you'll be able to start purchasing our products, ask questions, request support and suggest new ideas!

  • We are aware that a no permission error was shown when you tried to purchase in the last 2 days, this is now fixed.

Bug Fixed ErrorException: [E_WARNING] Undefined variable $providers

gOOvER

New Member
When i go to Dashboard -> Payment Data i get following error:


Code:
ErrorException: [E_WARNING] Undefined variable $providers in src/addons/XFA/RMMarketplace/Pub/Controller/Dashboard.php at line 392
XF::handlePhpError() in src/addons/XFA/RMMarketplace/Pub/Controller/Dashboard.php at line 392
XFA\RMMarketplace\Pub\Controller\Dashboard->actionPaymentData() in src/XF/Mvc/Dispatcher.php at line 352
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 259
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 115
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 57
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2353
XF\App->run() in src/XF.php at line 524
XF::runApp() in index.php at line 20

PHP: 8.1.12
Xenforo 2.2.11
 

Clement

Freaky Coder
Staff member
Edit the file src/addons/XFA/RMMarketplace/Pub/Controller/Dashboard.php.
Go to line 336.

After:
PHP:
        if ($options->xfa_rmmp_mode == 'xf')
        {
            // Get providers
            $providers = $this->repository('XF:Payment')->findActivePaymentProviders()->whereId($options->xfa_rmmp_paymentProviderIds)->fetch();
           
            // Get user profiles
            $profiles = $this->finder('XF:PaymentProfile')->where('xfa_rmmp_user_id', \XF::visitor()->user_id)->keyedBy('provider_id')->fetch();
        }

Add:
PHP:
else
{
            $providers = null;
            $profiles = null;
}

This will be fixed in the next release.
 

gOOvER

New Member
added the lines, but still

Code:
ErrorException: [E_WARNING] Undefined variable $providers in src/addons/XFA/RMMarketplace/Pub/Controller/Dashboard.php at line 392
XF::handlePhpError() in src/addons/XFA/RMMarketplace/Pub/Controller/Dashboard.php at line 392
XFA\RMMarketplace\Pub\Controller\Dashboard->actionPaymentData() in src/XF/Mvc/Dispatcher.php at line 352
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 259
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 115
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 57
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2353
XF\App->run() in src/XF.php at line 524
XF::runApp() in index.php at line 20
 

Clement

Freaky Coder
Staff member
You are sure you added it after the finishing brace on the first code bit ?

Please post the modified area in your file (not the whole file obviously).
 
Top