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

Contract notification 'Period End' or 'Period End + Notice' : missing fields & php errors #68

Closed
blerohellec opened this issue Aug 15, 2015 · 0 comments
Labels
Milestone

Comments

@blerohellec
Copy link

v 0.85 or 0.90
When notification 'Periodicity' or 'Periodicity Notice' is used for contracts, with the default notification template 'Contracts', some fields are missing in the notification (name, number and type of contract) and some php errors are generated. Extract from php-errors.log hereafter.
In inc/contract.class.php, function cronContract, variable $contracts passed to raisedEvent (near line 1135) is not fully initialized in the cases mentionned above.
See http://forum.glpi-project.org/viewtopic.php?id=82880

2015-08-03 16:26:48 [2@debian]
*** PHP Notice(8): Undefined index: name
Backtrace :
inc/notificationtargetcontract.class.php:69
inc/notificationtarget.class.php:1069 NotificationTargetContract->getDatasForTemplate()
inc/notificationtemplate.class.php:236 NotificationTarget->getForTemplate()
inc/notificationevent.class.php:166 NotificationTemplate->getTemplateByLanguage()
inc/contract.class.php:1136 NotificationEvent::raiseEvent()
: Contract::cronContract()
inc/crontask.class.php:796 call_user_func()
front/crontask.form.php:46 CronTask::launch()
2015-08-03 16:26:48 [2@debian]
*** PHP Notice(8): Undefined index: num
Backtrace :
inc/notificationtargetcontract.class.php:70
inc/notificationtarget.class.php:1069 NotificationTargetContract->getDatasForTemplate()
inc/notificationtemplate.class.php:236 NotificationTarget->getForTemplate()
inc/notificationevent.class.php:166 NotificationTemplate->getTemplateByLanguage()
inc/contract.class.php:1136 NotificationEvent::raiseEvent()
: Contract::cronContract()
inc/crontask.class.php:796 call_user_func()
front/crontask.form.php:46 CronTask::launch()
2015-08-03 16:26:48 [2@debian]
*** PHP Notice(8): Undefined index: contracttypes_id
Backtrace :
inc/notificationtargetcontract.class.php:72
inc/notificationtarget.class.php:1069 NotificationTargetContract->getDatasForTemplate()
inc/notificationtemplate.class.php:236 NotificationTarget->getForTemplate()
inc/notificationevent.class.php:166 NotificationTemplate->getTemplateByLanguage()
inc/contract.class.php:1136 NotificationEvent::raiseEvent()
: Contract::cronContract()
inc/crontask.class.php:796 call_user_func()
front/crontask.form.php:46 CronTask::launch()

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

No branches or pull requests

2 participants