We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I suspect this is an issue when running on PHP 7.2. When trying to unblock an IP that is blocked, we get the following error:
Error: Cannot use string offset as an array in /DIR/modules/addons/csfmanager/includes/class_firewall.php:154 Stack trace: #0 /DIR/modules/addons/csfmanager/csfmanager.php(713): Firewall->checkIP(NULL, '0') #1 /DIR/vendor/whmcs/whmcs-foundation/lib/Module/AbstractModule.php(0): csfmanager_clientarea(Array) #2 /DIR/vendor/whmcs/whmcs-foundation/lib/Module/Addon.php(0): WHMCS\Module\AbstractModule->call('clientarea', Array) #3 /DIR/vendor/whmcs/whmcs-foundation/lib/Module/ClientAreaController.php(0): WHMCS\Module\Addon->call('clientarea', Array) #4 [internal function]: WHMCS\Module\ClientAreaController->index(Object(WHMCS\Http\Message\ServerRequest)) #5 /DIR/vendor/middlewares/utils/src/CallableHandler.php(26): call_user_func_array(Array, Array) #6 /DIR/vendor/middlewares/fast-route/src/FastRoute.php(96): Middlewares\Utils\CallableHandler::execute(Array, Array) #7 /DIR/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/HandleProcessor.php(0): Middlewares\FastRoute->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate)) #8 /DIR/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\HandleProcessor->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate)) #9 /DIR/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\HandleProcessor->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate)) #10 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils{closure}(Object(WHMCS\Http\Message\ServerRequest)) #11 /DIR/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest)) #12 /DIR/vendor/middlewares/utils/src/Dispatcher.php(56): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest)) #13 /DIR/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/BackendDispatch.php(0): Middlewares\Utils\Dispatcher->dispatch(Object(WHMCS\Http\Message\ServerRequest)) #14 /DIR/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\BackendDispatch->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate)) #15 /DIR/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\BackendDispatch->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate)) #16 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils{closure}(Object(WHMCS\Http\Message\ServerRequest)) #17 /DIR/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest)) #18 /DIR/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/RoutePathMatch.php(0): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest)) #19 /DIR/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\RoutePathMatch->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate)) #20 /DIR/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\RoutePathMatch->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate)) #21 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils{closure}(Object(WHMCS\Http\Message\ServerRequest)) #22 /DIR/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest)) #23 /DIR/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/WhitelistFilter.php(0): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest)) #24 /DIR/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/DelegatingMiddlewareTrait.php(0): WHMCS\Route\Middleware\WhitelistFilter->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate)) #25 /DIR/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\WhitelistFilter->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate)) #26 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils{closure}(Object(WHMCS\Http\Message\ServerRequest)) #27 /DIR/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest)) #28 /DIR/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/RoutableClientModuleRequest.php(0): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest)) #29 /DIR/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\RoutableClientModuleRequest->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate)) #30 /DIR/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\RoutableClientModuleRequest->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate)) #31 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils{closure}(Object(WHMCS\Http\Message\ServerRequest)) #32 /DIR/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest)) #33 /DIR/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/RoutableAdminRequestUri.php(0): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest)) #34 /DIR/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\RoutableAdminRequestUri->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate)) #35 /DIR/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\RoutableAdminRequestUri->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate)) #36 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils{closure}(Object(WHMCS\Http\Message\ServerRequest)) #37 /DIR/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest)) #38 /DIR/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/RoutableRequestUri.php(0): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest)) #39 /DIR/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\RoutableRequestUri->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate)) #40 /DIR/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\RoutableRequestUri->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate)) #41 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils{closure}(Object(WHMCS\Http\Message\ServerRequest)) #42 /DIR/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest)) #43 /DIR/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/RoutableRequestQueryUri.php(0): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest)) #44 /DIR/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\RoutableRequestQueryUri->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate)) #45 /DIR/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\RoutableRequestQueryUri->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate)) #46 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils{closure}(Object(WHMCS\Http\Message\ServerRequest)) #47 /DIR/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest)) #48 /DIR/vendor/middlewares/utils/src/Dispatcher.php(56): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest)) #49 /DIR/index.php(0): Middlewares\Utils\Dispatcher->dispatch(Object(WHMCS\Http\Message\ServerRequest)) #50 {main}
The text was updated successfully, but these errors were encountered:
I think this is fixed simply by changing line 120 of includes/class_firewall.php to:
$output = array('success' => false, 'message' => '', 'data' => array());
Sorry, something went wrong.
No branches or pull requests
I suspect this is an issue when running on PHP 7.2. When trying to unblock an IP that is blocked, we get the following error:
Error: Cannot use string offset as an array in /DIR/modules/addons/csfmanager/includes/class_firewall.php:154
Stack trace:
#0 /DIR/modules/addons/csfmanager/csfmanager.php(713): Firewall->checkIP(NULL, '0')
#1 /DIR/vendor/whmcs/whmcs-foundation/lib/Module/AbstractModule.php(0): csfmanager_clientarea(Array)
#2 /DIR/vendor/whmcs/whmcs-foundation/lib/Module/Addon.php(0): WHMCS\Module\AbstractModule->call('clientarea', Array)
#3 /DIR/vendor/whmcs/whmcs-foundation/lib/Module/ClientAreaController.php(0): WHMCS\Module\Addon->call('clientarea', Array)
#4 [internal function]: WHMCS\Module\ClientAreaController->index(Object(WHMCS\Http\Message\ServerRequest))
#5 /DIR/vendor/middlewares/utils/src/CallableHandler.php(26): call_user_func_array(Array, Array)
#6 /DIR/vendor/middlewares/fast-route/src/FastRoute.php(96): Middlewares\Utils\CallableHandler::execute(Array, Array)
#7 /DIR/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/HandleProcessor.php(0): Middlewares\FastRoute->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#8 /DIR/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\HandleProcessor->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#9 /DIR/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\HandleProcessor->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#10 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils{closure}(Object(WHMCS\Http\Message\ServerRequest))
#11 /DIR/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest))
#12 /DIR/vendor/middlewares/utils/src/Dispatcher.php(56): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest))
#13 /DIR/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/BackendDispatch.php(0): Middlewares\Utils\Dispatcher->dispatch(Object(WHMCS\Http\Message\ServerRequest))
#14 /DIR/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\BackendDispatch->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#15 /DIR/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\BackendDispatch->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#16 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils{closure}(Object(WHMCS\Http\Message\ServerRequest))
#17 /DIR/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest))
#18 /DIR/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/RoutePathMatch.php(0): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest))
#19 /DIR/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\RoutePathMatch->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#20 /DIR/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\RoutePathMatch->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#21 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils{closure}(Object(WHMCS\Http\Message\ServerRequest))
#22 /DIR/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest))
#23 /DIR/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/WhitelistFilter.php(0): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest))
#24 /DIR/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/DelegatingMiddlewareTrait.php(0): WHMCS\Route\Middleware\WhitelistFilter->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#25 /DIR/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\WhitelistFilter->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#26 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils{closure}(Object(WHMCS\Http\Message\ServerRequest))
#27 /DIR/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest))
#28 /DIR/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/RoutableClientModuleRequest.php(0): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest))
#29 /DIR/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\RoutableClientModuleRequest->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#30 /DIR/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\RoutableClientModuleRequest->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#31 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils{closure}(Object(WHMCS\Http\Message\ServerRequest))
#32 /DIR/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest))
#33 /DIR/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/RoutableAdminRequestUri.php(0): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest))
#34 /DIR/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\RoutableAdminRequestUri->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#35 /DIR/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\RoutableAdminRequestUri->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#36 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils{closure}(Object(WHMCS\Http\Message\ServerRequest))
#37 /DIR/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest))
#38 /DIR/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/RoutableRequestUri.php(0): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest))
#39 /DIR/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\RoutableRequestUri->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#40 /DIR/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\RoutableRequestUri->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#41 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils{closure}(Object(WHMCS\Http\Message\ServerRequest))
#42 /DIR/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest))
#43 /DIR/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/RoutableRequestQueryUri.php(0): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest))
#44 /DIR/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\RoutableRequestQueryUri->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#45 /DIR/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\RoutableRequestQueryUri->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#46 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils{closure}(Object(WHMCS\Http\Message\ServerRequest))
#47 /DIR/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest))
#48 /DIR/vendor/middlewares/utils/src/Dispatcher.php(56): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest))
#49 /DIR/index.php(0): Middlewares\Utils\Dispatcher->dispatch(Object(WHMCS\Http\Message\ServerRequest))
#50 {main}
The text was updated successfully, but these errors were encountered: