Hello, I have tested the latest version of Credits Premium on PHP 7.0.1 and it did not work (working fine with PHP 5.6.16). I was getting these errors: PHP: ErrorException: Fatal Error: 'continue' not in the 'loop' or 'switch' context - library/Brivium/Credits/Action.php:238 Line 238: PHP: public function setActionHandler($actionId) { if(isset($this->_actionHandlers[$actionId])){ return $this->_actionHandlers[$actionId]; } $this->_actionHandlers[$actionId] = false; $disableActions = array(); if (!$this->_dependencies instanceof XenForo_Dependencies_Admin) { $disableActions = $this->_disabledActions; } if(!$disableActions){ $disableActions = array(); } if(!empty($this->_actionClasses[$actionId])){ $handlerClass = $this->_actionClasses[$actionId]; if (strpos($handlerClass, '_') === false) { $handlerClass = 'Brivium_Credits_ActionHandler_' . $handlerClass . '_ActionHandler'; } if(empty($this->_actionHandlers[$actionId]) && !in_array($actionId, $disableActions)){ try { if (!$handlerClass || !class_exists($handlerClass)) { continue; } $handlerClass = XenForo_Application::resolveDynamicClass($handlerClass); $handler = new $handlerClass(); if($handler && $handler->canUseAction()){ $this->_actionHandlers[$actionId] = $handler; } } catch (Exception $e) {} } } return $this->_actionHandlers[$actionId]; } The addon is great but please add support for PHP 7. Thank you
Hello, Thanks for your reported bug(s). We will have an upgrade version to solve your issue(s) shortly. Regards,
Hello, Thanks for version 2.0.6. It fixed the error i posted above. There is one more error that is showing up when i try to visit /credits. Please take a look. Here is the error log: PHP: Error InfoErrorException: Array to string conversion - library/Brivium/Credits/ActionHandler/Abstract.php:327Generated By: Admin, 7 minutes agoStack Trace#0 /var/www/vhosts/example.com/httpdocs/library/Brivium/Credits/ActionHandler/Abstract.php(327): XenForo_Application::handlePhpError(8, 'Array to string...', '/var/www/vhosts...', 327, Array)#1 /var/www/vhosts/example.com/httpdocs/library/Brivium/Credits/Action.php(442): Brivium_Credits_ActionHandler_Abstract->canTriggerEvent(Array, Array, 0)#2 /var/www/vhosts/example.com/httpdocs/library/Brivium/Credits/Action.php(421): Brivium_Credits_Action->checkTriggerActionEvent(Array, Array, 0)#3 /var/www/vhosts/example.com/httpdocs/library/Brivium/Credits/Action.php(411): Brivium_Credits_Action->checkTriggerActionEvents(Array, Array, 0)#4 /var/www/vhosts/example.com/httpdocs/library/Brivium/Credits/ControllerHelper/Credit.php(83): Brivium_Credits_Action->canTriggerActionEvents('transfer')#5 /var/www/vhosts/example.com/httpdocs/library/Brivium/Credits/ControllerPublic/Credits.php(1163): Brivium_Credits_ControllerHelper_Credit->getWrapper('credits', 'index', Object(XenForo_ControllerResponse_View))#6 /var/www/vhosts/example.com/httpdocs/library/Brivium/Credits/ControllerPublic/Credits.php(135): Brivium_Credits_ControllerPublic_Credits->_getWrapper('credits', 'index', Object(XenForo_ControllerResponse_View))#7 /var/www/vhosts/example.com/httpdocs/library/XenForo/FrontController.php(351): Brivium_Credits_ControllerPublic_Credits->actionIndex()#8 /var/www/vhosts/example.com/httpdocs/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))#9 /var/www/vhosts/example.com/httpdocs/index.php(13): XenForo_FrontController->run()#10 {main}Request Statearray(3) { ["url"] => string(34) "https://www.example.com/credits/" ["_GET"] => array(0) { } ["_POST"] => array(0) { }} Update: I also notice that most actions can not be fired, credit transactions are not recorded on PHP 7. Best Regards,