salesagility / SuiteCRM-Core

SuiteCRM - Open source CRM for the world
https://www.suitecrm.com
GNU Affero General Public License v3.0
182 stars 134 forks source link

replace `require` with `require_once` in `entryPoint.php` #554

Open JoshMcCullough opened 1 month ago

JoshMcCullough commented 1 month ago

Description

I am not a "PHP Guy", so this could be wrong. However, it fixes error messages such as:

PHP Fatal error: Cannot declare class TemplateText, because the name is already in use

Same with LanguageManager.php and VardefManager.php, and likely but not confirmed, TemplateText.php.

Motivation and Context

I noticed the error while authenticating via the API, when the server returned 500.

How To Test This

Execute the below command and verify that the above error message does not appear in the log.

curl --location --request GET 'localhost/service/v4_1/rest.php' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'method=login' \
--data-urlencode 'input_type=JSON' \
--data-urlencode 'response_type=JSON' \
--data-urlencode 'rest_data={"user_auth":{"user_name":"admin","password":"password"},"application_name":"test"}'

Types of changes

Final checklist

SuiteBot commented 1 month ago

CLA assistant check
All committers have signed the CLA.

JoshMcCullough commented 1 month ago

Can we get this simple fix merged soon, please?