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

Php8.2 fixes in report addToDeveloperTab function #25800

Merged
merged 1 commit into from
Mar 13, 2023

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Php8.2 fixes in report addToDeveloperTab function

Before

api_v3_ReportTemplateTest::testReportTemplateGetRowsAllReports with data set #25 ('case/demographics')
Failure in api call for report_template getrows: Creation of dynamic property CRM_Report_Form_Case_Demographics::$sqlFormattedArray is deprecated

After

local variable used

Technical Details

Minor NFC tidy ups

Comments

@civibot civibot bot added the master label Mar 12, 2023
@civibot
Copy link

civibot bot commented Mar 12, 2023

(Standard links)

@eileenmcnaughton
Copy link
Contributor Author

Hmm will I be able to read the style parser output once they have all finished? Cos I'm confused right now

@@ -1534,8 +1537,8 @@ public function addToDeveloperTab($sql) {
foreach (['FROM', 'WHERE', 'GROUP BY', 'ORDER BY', 'LIMIT', ';'] as $term) {
$sql = str_replace($term, '<br><br>' . $term, ($sql ?? ''));
}
$this->sqlFormattedArray[] = $sql;
$this->assign('sql', implode(';<br><br><br><br>', $this->sqlFormattedArray));
$sqlFormattedArray = $sql;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't look right. $sql is a string - it should be added to the array not replacing the array.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@demeritcowboy yep - you are right - I wonder if that is what the tests are trying to tell me or not

@demeritcowboy
Copy link
Contributor

The test seems to start crashing around here. I don't know if it's related - it doesn't give a stacktrace.

not ok 2131 - Error: api_v3_ReportTemplateTest::testReportTemplateGetRowsAllReports with data set #37 ('logging/contact/detail')            

@demeritcowboy
Copy link
Contributor

jenkins retest this please

@eileenmcnaughton eileenmcnaughton merged commit 41cce11 into civicrm:master Mar 13, 2023
@eileenmcnaughton eileenmcnaughton deleted the 82_sql branch March 13, 2023 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants