BillTechPL / lms-billtech-plugin

Other
6 stars 7 forks source link

Brak sprawdzania niepuste $payment['cashid'] #128

Closed interduo closed 3 months ago

interduo commented 8 months ago

https://github.com/BillTechPL/lms-billtech-plugin/blob/984d6462e5e563fceb9d59a1da0587930ed08039/BillTechPaymentsUpdater.php#L48

Tutaj w okolicach - brakuje warunku if (!empty($payment['cashid'])) - bardzo okazjonalnie gdy płatność nie ma cashid to wyrzuca:

PHP Fatal error:  Uncaught Error: Call to a member function GetCashByID() on null in /var/www/html/lms/plugins/BillTech/BillTechPaymentsUpdater.php:75
Stack trace:
#0 /var/www/html/lms/plugins/BillTech/BillTechPaymentsUpdater.php(33): BillTechPaymentsUpdater->checkExpired()
#1 /var/www/html/lms/plugins/BillTech/BillTech.php(46): BillTechPaymentsUpdater->checkForUpdate()
#2 /var/www/html/lms/lib/LMSPluginManager/LMSPluginManager.php(86): BillTech->__construct()
#3 /var/www/html/lms/devel/upgradedb.php(166): LMSPluginManager->__construct()
#4 {main}
  thrown in /var/www/html/lms/plugins/BillTech/BillTechPaymentsUpdater.php on line 75