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

Fixed cron php notice #6375

Open
wants to merge 1 commit into
base: hotfix-7.10.x
Choose a base branch
from

Conversation

Dillon-Brown
Copy link
Contributor

Description

Fixes php notices.

Motivation and Context

PHP Notice: Undefined index user_department in templateParser.php on line 129
PHP Notice: Use of undefined constant dbType - assumed 'dbType' templateParser.php on line 129
PHP Notice: Undefined property Contact::$email in templateParser.php on line 95

How To Test This

  1. Run php -f cron.php
  2. Check for PHP notices.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Final checklist

  • My code follows the code style of this project found here.
  • My change requires a change to the documentation.
  • I have read the How to Contribute guidelines.

gymad
gymad previously approved these changes Oct 1, 2018
modules/AOS_PDF_Templates/templateParser.php Outdated Show resolved Hide resolved
@Dillon-Brown Dillon-Brown changed the base branch from hotfix-7.8.x to hotfix-7.10.x August 5, 2019 14:25
@Dillon-Brown Dillon-Brown changed the base branch from hotfix-7.10.x to hotfix-7.8.x August 5, 2019 14:26
@Mac-Rae
Copy link
Contributor

Mac-Rae commented Aug 5, 2019

Please rebase this pull request to the hotfix-7.10.x branch as version 7.8.x of SuiteCRM has reached its end of life and therefore will no longer be receiving updates.

For more information about 7.8.x end of life please visit our blog post

@Mac-Rae Mac-Rae added the PR:Wrong Branch Pull requests that point towards a restricted branch such as master label Aug 5, 2019
@Dillon-Brown Dillon-Brown changed the base branch from hotfix-7.8.x to hotfix-7.10.x August 5, 2019 14:29
@connorshea
Copy link
Contributor

@Dillon-Brown I'm not sure if we use cronjobs more than other users, but our logs are being absolutely battered by this (at least, I think it's this issue, the line number is almost the same).

[13-Sep-2019 20:19:23 UTC] PHP Notice:  Undefined index: assigned_user_name_sales_rep_c in /www/SuiteCRM/html/modules/AOS_PDF_Templates/templateParser.php on line 138
[13-Sep-2019 20:19:23 UTC] PHP Notice:  Undefined index: assigned_user_name_reports_to_name in /www/SuiteCRM/html/modules/AOS_PDF_Templates/templateParser.php on line 138
[13-Sep-2019 20:19:23 UTC] PHP Notice:  Undefined index: assigned_user_name_reports_to_link in /www/SuiteCRM/html/modules/AOS_PDF_Templates/templateParser.php on line 138
[13-Sep-2019 20:19:23 UTC] PHP Notice:  Undefined index: assigned_user_name_reports_to_id in /www/SuiteCRM/html/modules/AOS_PDF_Templates/templateParser.php on line 138
[13-Sep-2019 20:19:23 UTC] PHP Notice:  Undefined index: assigned_user_name_reportees in /www/SuiteCRM/html/modules/AOS_PDF_Templates/templateParser.php on line 138
[13-Sep-2019 20:19:23 UTC] PHP Notice:  Undefined index: assigned_user_name_receive_notifications in /www/SuiteCRM/html/modules/AOS_PDF_Templates/templateParser.php on line 138
[13-Sep-2019 20:19:23 UTC] PHP Notice:  Undefined index: assigned_user_name_pwd_last_changed in /www/SuiteCRM/html/modules/AOS_PDF_Templates/templateParser.php on line 138
[13-Sep-2019 20:19:23 UTC] PHP Notice:  Undefined index: assigned_user_name_prospect_lists in /www/SuiteCRM/html/modules/AOS_PDF_Templates/templateParser.php on line 138
[13-Sep-2019 20:19:23 UTC] PHP Notice:  Undefined index: assigned_user_name_project_users_1 in /www/SuiteCRM/html/modules/AOS_PDF_Templates/templateParser.php on line 138
[13-Sep-2019 20:19:23 UTC] PHP Notice:  Undefined index: assigned_user_name_project_resource in /www/SuiteCRM/html/modules/AOS_PDF_Templates/templateParser.php on line 138
[13-Sep-2019 20:19:23 UTC] PHP Notice:  Undefined index: assigned_user_name_portal_only in /www/SuiteCRM/html/modules/AOS_PDF_Templates/templateParser.php on line 138
[13-Sep-2019 20:19:23 UTC] PHP Notice:  Undefined index: assigned_user_name_photo in /www/SuiteCRM/html/modules/AOS_PDF_Templates/templateParser.php on line 138
[13-Sep-2019 20:19:23 UTC] PHP Notice:  Undefined index: assigned_user_name_phone_work in /www/SuiteCRM/html/modules/AOS_PDF_Templates/templateParser.php on line 138
[13-Sep-2019 20:19:23 UTC] PHP Notice:  Undefined index: assigned_user_name_phone_other in /www/SuiteCRM/html/modules/AOS_PDF_Templates/templateParser.php on line 138
[13-Sep-2019 20:19:23 UTC] PHP Notice:  Undefined index: assigned_user_name_phone_name_c in /www/SuiteCRM/html/modules/AOS_PDF_Templates/templateParser.php on line 138
[13-Sep-2019 20:19:23 UTC] PHP Notice:  Undefined index: assigned_user_name_phone_mobile in /www/SuiteCRM/html/modules/AOS_PDF_Templates/templateParser.php on line 138
[13-Sep-2019 20:19:23 UTC] PHP Notice:  Undefined index: assigned_user_name_phone_home in /www/SuiteCRM/html/modules/AOS_PDF_Templates/templateParser.php on line 138
[13-Sep-2019 20:19:23 UTC] PHP Notice:  Undefined index: assigned_user_name_phone_fax in /www/SuiteCRM/html/modules/AOS_PDF_Templates/templateParser.php on line 138
[13-Sep-2019 20:19:23 UTC] PHP Notice:  Undefined index: assigned_user_name_oauth_tokens in /www/SuiteCRM/html/modules/AOS_PDF_Templates/templateParser.php on line 138
[13-Sep-2019 20:19:23 UTC] PHP Notice:  Undefined index: assigned_user_name_name in /www/SuiteCRM/html/modules/AOS_PDF_Templates/templateParser.php on line 138
[13-Sep-2019 20:19:23 UTC] PHP Notice:  Undefined index: assigned_user_name_modified_user_id in /www/SuiteCRM/html/modules/AOS_PDF_Templates/templateParser.php on line 138
[13-Sep-2019 20:19:23 UTC] PHP Notice:  Undefined index: assigned_user_name_modified_by_name in /www/SuiteCRM/html/modules/AOS_PDF_Templates/templateParser.php on line 138
[13-Sep-2019 20:19:23 UTC] PHP Notice:  Undefined index: assigned_user_name_middle_name_c in /www/SuiteCRM/html/modules/AOS_PDF_Templates/templateParser.php on line 138
[13-Sep-2019 20:19:23 UTC] PHP Notice:  Undefined index: assigned_user_name_messenger_type in /www/SuiteCRM/html/modules/AOS_PDF_Templates/templateParser.php on line 138
[13-Sep-2019 20:19:23 UTC] PHP Notice:  Undefined index: assigned_user_name_messenger_id in /www/SuiteCRM/html/modules/AOS_PDF_Templates/templateParser.php on line 138
[13-Sep-2019 20:19:23 UTC] PHP Notice:  Undefined index: assigned_user_name_meetings in /www/SuiteCRM/html/modules/AOS_PDF_Templates/templateParser.php on line 138
[13-Sep-2019 20:19:23 UTC] PHP Notice:  Undefined index: assigned_user_name_m_accept_status_fields in /www/SuiteCRM/html/modules/AOS_PDF_Templates/templateParser.php on line 13

We have a comment at the top of the file that's 5 lines long, but other than that the file is exactly the same as it is on 7.10.19. The rest of the line difference between your error and mine can presumably be explained by the changes made to the file since this issue was opened.

@connorshea
Copy link
Contributor

I also have this:

Undefined property: Contact::$email in /www/SuiteCRM/html/modules/AOS_PDF_Templates/templateParser.php on line 104

I'm on 7.10.19, PHP 7.0, MySQL 5.7, Debian Linux. I'd appreciate if this PR were rebased so it can be merged :) I'll try to backport it and report back whether it fixes the problem.

@connorshea
Copy link
Contributor

@Dillon-Brown I'm tempted to just backport this change and deploy it, because I can't for the life of me figure out how to reproduce it locally but it's spamming up our logs. How confident would you say you are in this fix? :) (also could you have it run in CI so I at least have that to comfort me 😄)

@Mac-Rae Mac-Rae removed the PR:Wrong Branch Pull requests that point towards a restricted branch such as master label Oct 31, 2019
@SuiteBot
Copy link

SuiteBot commented Aug 27, 2020

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants