Skip to content
New issue

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

PHP Fatal error: Uncaught Error: Non-static method SugarWidgetReportField::_get_column_select() #10199

Closed
gunnicom opened this issue Sep 21, 2023 · 1 comment
Labels
Area: Dashlets Issues & PRs related to all things regarding the dashlets Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds Status:Fix Proposed A issue that has a PR related to it that provides a possible resolution Type:Bug Bugs within the core SuiteCRM codebase

Comments

@gunnicom
Copy link
Contributor

There seem to be a mismatch of static non static functions in the SugarwidgetFields.
Most of the times it is called non-static like $this->_get_column_select() , but here in this widget id is called statically.
Also it is overwritten in the class , but in some places the parent::_get_column_select seems to be called.
I don't know twht causes this, as I did not hear of anyone if this makes problems.

Issue

Following in PHP log:

[Thu Sep 21 16:39:35.319406 2023] [proxy_fcgi:error] [pid 3649778:tid 140631512569600] [remote 10.207.24.9:50374] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught Error: Non-static method SugarWidgetReportField::_get_column_select() cannot be called statically in /var/www/suite/include/generic/SugarWidgets/SugarWidgetFieldname.php:231
Stack trace:
#0 /var/www/suite/include/Dashlets/DashletGeneric.php(365): SugarWidgetFieldName->queryFilterone_of()
#1 /var/www/suite/include/Dashlets/DashletGeneric.php(416): DashletGeneric->buildWhere()
#2 /var/www/suite/modules/Home/index.php(244): DashletGeneric->process()
#3 /var/www/suite/modules/Home/views/view.list.php(55): include('...')
#4 /var/www/suite/include/MVC/View/SugarView.php(210): HomeViewList->display()
#5 /var/www/suite/include/MVC/Controller/SugarController.php(432): SugarView->process()
#6 /var/www/suite/include/MVC/Controller/SugarController.php(363): SugarController->processView()
#7 /var/www/suite/include/MVC/SugarApplication.php(101): SugarController->execute()
#8 /var/www/suite/index.php(52): SugarApplication->execute()
#9 {main}
  thrown in /var/www/suite/inc...'

Expected Behavior

No fatal PHP errors

Actual Behavior

Fatal PHP errors

Your Environment

  • SuiteCRM Version used: 7.14.0
  • Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)):
  • Environment name and version (e.g. MySQL, PHP 7): PHP 8.2.10
  • Operating System and version (e.g Ubuntu 16.04): Debian GNU/Linux 11
@TwizzX17
Copy link
Contributor

The php version 8.0 does no longer allow non-static class methods to be called by the operator ::

Reverting back to a php version 7.4 could be a temporary solution to your problem.

TwizzX17 added a commit to TwizzX17/SuiteCRM that referenced this issue Sep 29, 2023
…c method SugarWidgetReportField::_get_column_select()

PHP version 8 seems to have deprecated the non-static method calling. In this fix the class SugarWidgetFieldid is being instantiated and set as a property for reusability throughout the class.
TwizzX17 added a commit to TwizzX17/SuiteCRM that referenced this issue Oct 2, 2023
…method SugarWidgetReportField::_get_column_select()

PHP version 8 seems to have deprecated the non-static method calling. In this fix the class SugarWidgetFieldid is being instantiated and set as a property for reusability throughout the class.

Fixed indentation

Minor format adjustment
@johnM2401 johnM2401 added Type:Bug Bugs within the core SuiteCRM codebase Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds Area: Dashlets Issues & PRs related to all things regarding the dashlets Status:Fix Proposed A issue that has a PR related to it that provides a possible resolution labels Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Dashlets Issues & PRs related to all things regarding the dashlets Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds Status:Fix Proposed A issue that has a PR related to it that provides a possible resolution Type:Bug Bugs within the core SuiteCRM codebase
Projects
None yet
Development

No branches or pull requests

3 participants