Openprovider-WHMCS-domains icon indicating copy to clipboard operation
Openprovider-WHMCS-domains copied to clipboard

[BUG] Fatal error: Cannot redeclare getadminpermsarray() in on line 0

Open nahars001 opened this issue 1 year ago • 1 comments

Describe the bug Fatal error: Cannot redeclare getadminpermsarray() in on line 0

To Reproduce Steps to reproduce the behavior: whmcs 8.10.1 php 8.1

open invoice page or view invoice as client this page will not open and it'll throw error can't redcleare Fatal error: Cannot redeclare getadminpermsarray() in on line 0 Oops! Something went wrong and we couldn't process your request. Please go back to the previous page and try again.

For additional assistance, please reference the WHMCS TroubleShooting Guide »

Whoops\Exception\ErrorException: Cannot redeclare getadminpermsarray() in :0 Stack trace: #0 /home/username/public_html/vendor/whmcs/whmcs-foundation/lib/Utility/Error/Run.php(0): WHMCS\Utility\Error\Run->handleError(1, 'Cannot redeclar...', '', 0) #1 [internal function]: WHMCS\Utility\Error\Run->handleShutdown() #2 {main} Expected behavior A clear and concise description of what you expected to happen.

Screenshots image

Server info:

  • Distro: whmcs
  • PHP: 8.1
  • Web server:httpd

Additional context invoice page works fine after disabling this module

nahars001 avatar Jan 11 '25 17:01 nahars001

Hi @nahars001,

Thank you for posting the problem!

We tried to reproduce the problem on our WHMCS instances with PHP 8.1, WHMCS 8.10 and module version 5.8.0, but we couldn't.

I couldn't find any place in module code where we use this WHMCS function - getadminpermsarray(). Based on the information from developers, the function returns the list of permissions that you see when creating or editing a role.

Are you trying to access invoices in client area as an admin user or are you logging in with client credentials? If you can respond to the related support case with details, we will be happy to check this further to see why it occurs when activating the Openprovider module.

sapillai avatar Jan 14 '25 07:01 sapillai